windows bug fix on dtls retry

This commit is contained in:
John Safranek 2012-10-03 15:29:28 -07:00
parent f7c740df8f
commit 95a30e3f0a
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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