diff --git a/src/internal.c b/src/internal.c index d3cd51e00..ce70ce92c 100644 --- a/src/internal.c +++ b/src/internal.c @@ -1607,7 +1607,7 @@ retry: case IO_ERR_CONN_RST: /* connection reset */ #ifdef USE_WINDOWS_API if (ssl->options.dtls) { - return WANT_READ; + goto retry; } #endif ssl->options.connReset = 1; diff --git a/src/io.c b/src/io.c index 85a03c67a..7ed6f9e85 100644 --- a/src/io.c +++ b/src/io.c @@ -150,7 +150,7 @@ int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx) && !CyaSSL_get_using_nonblock(ssl) && dtls_timeout != 0) { #ifdef USE_WINDOWS_API - DWORD timeout = dtls_timeout; + DWORD timeout = dtls_timeout * 1000; #else struct timeval timeout = {dtls_timeout, 0}; #endif @@ -275,7 +275,7 @@ int EmbedReceiveFrom(CYASSL *ssl, char *buf, int sz, void *ctx) CYASSL_ENTER("EmbedReceiveFrom()"); if (!CyaSSL_get_using_nonblock(ssl) && dtls_timeout != 0) { #ifdef USE_WINDOWS_API - DWORD timeout = dtls_timeout; + DWORD timeout = dtls_timeout * 1000; #else struct timeval timeout = {dtls_timeout, 0}; #endif