Skip to content

Commit ba37dc9

Browse files
committed
Fixes bug where example server with WOLFSSL_CALLBACKS hangs when used with
-6 option (simulated WANT_WRITE errors) or with DTLS, causing make check to fail
1 parent 9d632cc commit ba37dc9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

examples/server/server.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3392,7 +3392,14 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
33923392
} while (err == WC_PENDING_E);
33933393
}
33943394
#else
3395-
(void)nonBlocking;
3395+
if (nonBlocking) {
3396+
#ifdef WOLFSSL_DTLS
3397+
if (doDTLS) {
3398+
wolfSSL_dtls_set_using_nonblock(ssl, 1);
3399+
}
3400+
#endif
3401+
tcp_set_nonblocking(&clientfd);
3402+
}
33963403
ret = NonBlockingSSL_Accept(ssl);
33973404
#endif
33983405
#ifdef WOLFSSL_EARLY_DATA

0 commit comments

Comments
 (0)