Return the close notify error when expecting an error.

This commit is contained in:
Juliusz Sosinowicz
2021-10-28 20:53:58 +02:00
parent 894303be59
commit adee6a86d1

View File

@ -3180,7 +3180,7 @@ 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) /* Got close notify */
if (err == WOLFSSL_ERROR_ZERO_RETURN && runWithErrors == 1) /* Got close notify */
err = 0;
if (err != 0) {
SSL_free(ssl); ssl = NULL;