Check correct var for server.c echo return.

This commit is contained in:
Juliusz Sosinowicz
2021-11-05 16:09:48 +01:00
parent ae84a2a326
commit 6d89de4f11

View File

@ -3183,7 +3183,8 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
}
else if (err == 0 || err == WOLFSSL_ERROR_ZERO_RETURN) {
err = ServerEchoData(ssl, clientfd, echoData, block, throughput);
if (err == WOLFSSL_ERROR_ZERO_RETURN && runWithErrors == 1) /* Got close notify */
/* Got close notify. Ignore it if not expecting a failure. */
if (err == WOLFSSL_ERROR_ZERO_RETURN && exitWithRet == 0)
err = 0;
if (err != 0) {
SSL_free(ssl); ssl = NULL;