allow dtls timeout to be 0 in the recvfrom callback, set to 0 if the handshake is done

This commit is contained in:
John Safranek
2016-02-22 21:13:05 -08:00
parent f621f81fa2
commit 69e00a3f97

View File

@ -404,7 +404,10 @@ int EmbedReceiveFrom(WOLFSSL *ssl, char *buf, int sz, void *ctx)
WOLFSSL_ENTER("EmbedReceiveFrom()");
if (!wolfSSL_get_using_nonblock(ssl) && dtls_timeout != 0) {
if (ssl->options.handShakeDone)
dtls_timeout = 0;
if (!wolfSSL_get_using_nonblock(ssl)) {
#ifdef USE_WINDOWS_API
DWORD timeout = dtls_timeout * 1000;
#else