File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7437,8 +7437,8 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_nofail(void* args)
74377437 !defined(WOLFSSL_NO_TLS12)
74387438static THREAD_RETURN WOLFSSL_THREAD test_server_loop(void* args)
74397439{
7440- SOCKET_T sockfd = 0 ;
7441- SOCKET_T clientfd = 0 ;
7440+ SOCKET_T sockfd;
7441+ SOCKET_T clientfd = -1 ;
74427442 word16 port;
74437443
74447444 callback_functions* cbf;
@@ -7601,6 +7601,7 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_loop(void* args)
76017601 wolfSSL_shutdown(ssl);
76027602 wolfSSL_free(ssl); ssl = NULL;
76037603 CloseSocket(clientfd);
7604+ clientfd = -1;
76047605
76057606 count++;
76067607 }
@@ -7618,7 +7619,8 @@ static THREAD_RETURN WOLFSSL_THREAD test_server_loop(void* args)
76187619 if (!sharedCtx)
76197620 wolfSSL_CTX_free(ctx);
76207621
7621- CloseSocket(clientfd);
7622+ if (clientfd >= 0)
7623+ CloseSocket(clientfd);
76227624
76237625#ifdef WOLFSSL_TIRTOS
76247626 fdCloseSession(Task_self());
You can’t perform that action at this time.
0 commit comments