Skip to content

Commit 03afce7

Browse files
committed
Forgive a socket error
1 parent 90b69ff commit 03afce7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/echoserver/echoserver.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,12 @@ static THREAD_RETURN WOLFSSH_THREAD server_worker(void* vArgs)
15791579

15801580
wolfSSH_free(threadCtx->ssh);
15811581

1582+
/* For socket error, it could have been the previous connection just ended
1583+
* early. Not really an error, no need to report error and quit. */
1584+
if (error == WS_SOCKET_ERROR_E) {
1585+
ret = 0;
1586+
}
1587+
15821588
if (ret != 0) {
15831589
fprintf(stderr, "Error [%d] \"%s\" with handling connection.\n", ret,
15841590
wolfSSH_ErrorToName(error));

0 commit comments

Comments
 (0)