diff options
author | marha <marha@users.sourceforge.net> | 2010-06-16 16:17:11 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-06-16 16:17:11 +0000 |
commit | fef0b61e18b9c7475e4d6e67ddfc55db46573f4e (patch) | |
tree | d4c68ba5b80ca0748fb23f1c344e859efd79503f /openssl/ssl/d1_lib.c | |
parent | 243edb24f5179d93c849ea326fb489d3f846db71 (diff) | |
download | vcxsrv-fef0b61e18b9c7475e4d6e67ddfc55db46573f4e.tar.gz vcxsrv-fef0b61e18b9c7475e4d6e67ddfc55db46573f4e.tar.bz2 vcxsrv-fef0b61e18b9c7475e4d6e67ddfc55db46573f4e.zip |
Switched to openssl-1.0.0a
Diffstat (limited to 'openssl/ssl/d1_lib.c')
-rw-r--r-- | openssl/ssl/d1_lib.c | 10 |
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; } |