forked from wolfSSL/wolfssl
windows bug fix on dtls retry
This commit is contained in:
@@ -1607,7 +1607,7 @@ retry:
|
|||||||
case IO_ERR_CONN_RST: /* connection reset */
|
case IO_ERR_CONN_RST: /* connection reset */
|
||||||
#ifdef USE_WINDOWS_API
|
#ifdef USE_WINDOWS_API
|
||||||
if (ssl->options.dtls) {
|
if (ssl->options.dtls) {
|
||||||
return WANT_READ;
|
goto retry;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ssl->options.connReset = 1;
|
ssl->options.connReset = 1;
|
||||||
|
4
src/io.c
4
src/io.c
@@ -150,7 +150,7 @@ int EmbedReceive(CYASSL *ssl, char *buf, int sz, void *ctx)
|
|||||||
&& !CyaSSL_get_using_nonblock(ssl)
|
&& !CyaSSL_get_using_nonblock(ssl)
|
||||||
&& dtls_timeout != 0) {
|
&& dtls_timeout != 0) {
|
||||||
#ifdef USE_WINDOWS_API
|
#ifdef USE_WINDOWS_API
|
||||||
DWORD timeout = dtls_timeout;
|
DWORD timeout = dtls_timeout * 1000;
|
||||||
#else
|
#else
|
||||||
struct timeval timeout = {dtls_timeout, 0};
|
struct timeval timeout = {dtls_timeout, 0};
|
||||||
#endif
|
#endif
|
||||||
@@ -275,7 +275,7 @@ int EmbedReceiveFrom(CYASSL *ssl, char *buf, int sz, void *ctx)
|
|||||||
CYASSL_ENTER("EmbedReceiveFrom()");
|
CYASSL_ENTER("EmbedReceiveFrom()");
|
||||||
if (!CyaSSL_get_using_nonblock(ssl) && dtls_timeout != 0) {
|
if (!CyaSSL_get_using_nonblock(ssl) && dtls_timeout != 0) {
|
||||||
#ifdef USE_WINDOWS_API
|
#ifdef USE_WINDOWS_API
|
||||||
DWORD timeout = dtls_timeout;
|
DWORD timeout = dtls_timeout * 1000;
|
||||||
#else
|
#else
|
||||||
struct timeval timeout = {dtls_timeout, 0};
|
struct timeval timeout = {dtls_timeout, 0};
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user