diff --git a/cyassl/test.h b/cyassl/test.h index c1d51e00a..b2bae5bc8 100644 --- a/cyassl/test.h +++ b/cyassl/test.h @@ -495,7 +495,6 @@ static INLINE void tcp_accept(SOCKET_T* sockfd, int* clientfd, func_args* args, static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd) { - (void)sockfd; #ifdef NON_BLOCKING #ifdef USE_WINDOWS_API unsigned long blocking = 1; @@ -505,6 +504,7 @@ static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd) int ret = fcntl(*sockfd, F_SETFL, flags | O_NONBLOCK); #endif #endif + (void)sockfd; } diff --git a/src/internal.c b/src/internal.c index 7038ad0a4..21c292fc5 100644 --- a/src/internal.c +++ b/src/internal.c @@ -1588,6 +1588,11 @@ retry: return WANT_READ; case IO_ERR_CONN_RST: /* connection reset */ + #ifdef USE_WINDOWS_API + if (ssl->options.dtls) { + return WANT_READ; + } + #endif ssl->options.connReset = 1; return -1;