aboutsummaryrefslogtreecommitdiff
path: root/openssl/ssl/d1_lib.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-17 08:30:55 +0000
committermarha <marha@users.sourceforge.net>2010-06-17 08:30:55 +0000
commiteb8e32daea99b6e3ebf134efeeba184c23817f08 (patch)
treeffbda57952ba3f40612e6409bd9a95f9a0a892dc /openssl/ssl/d1_lib.c
parented16af1abc515d7cc3ff9c5794aef89551fe7494 (diff)
parentfef0b61e18b9c7475e4d6e67ddfc55db46573f4e (diff)
downloadvcxsrv-eb8e32daea99b6e3ebf134efeeba184c23817f08.tar.gz
vcxsrv-eb8e32daea99b6e3ebf134efeeba184c23817f08.tar.bz2
vcxsrv-eb8e32daea99b6e3ebf134efeeba184c23817f08.zip
svn merge ^/branches/released .
Diffstat (limited to 'openssl/ssl/d1_lib.c')
-rw-r--r--openssl/ssl/d1_lib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/openssl/ssl/d1_lib.c b/openssl/ssl/d1_lib.c
index eeffce3cc..96b220e87 100644
--- a/openssl/ssl/d1_lib.c
+++ b/openssl/ssl/d1_lib.c
@@ -283,6 +283,16 @@ struct timeval* dtls1_get_timeout(SSL *s, struct timeval* timeleft)
timeleft->tv_usec += 1000000;
}
+ /* If remaining time is less than 15 ms, set it to 0
+ * to prevent issues because of small devergences with
+ * socket timeouts.
+ */
+ if (timeleft->tv_sec == 0 && timeleft->tv_usec < 15000)
+ {
+ memset(timeleft, 0, sizeof(struct timeval));
+ }
+
+
return timeleft;
}