diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-04-30 16:28:24 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-05-03 19:30:21 +0200 |
commit | aac07ad2d276f8b24c36cf7653b3215868b885d0 (patch) | |
tree | 1edafb9032ea60a9d313b87837440981fcc8d283 | |
parent | f47fc3004247575c4c044fd0435cacef442a0f44 (diff) | |
download | gnutls-aac07ad2d276f8b24c36cf7653b3215868b885d0.tar.gz |
gnutls_handshake_set_timeout will properly work with DTLS
-rw-r--r-- | lib/gnutls_handshake.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index 2b8a291c66..500d25258e 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -2597,6 +2597,11 @@ int gnutls_handshake(gnutls_session_t session) void gnutls_handshake_set_timeout(gnutls_session_t session, unsigned int ms) { + if (IS_DTLS(session)) { + gnutls_dtls_set_timeouts(session, 1000, ms); + return; + } + if (ms == GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT) ms = 40 * 1000; session->internals.handshake_timeout_ms = ms; |