summaryrefslogtreecommitdiffstats
path: root/ssl/d1_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-06-02 17:19:23 +0100
committerPauli <pauli@openssl.org>2021-06-04 11:06:08 +1000
commitf570d33b02d824e2a3f676f718c4692572f45333 (patch)
treefcfb7a5fa4caab1bb3787848087bcd21980f9d62 /ssl/d1_lib.c
parentd0196ddcba60a69930d1b1fec579949c8788be34 (diff)
Only call dtls1_start_timer() once
The function dtls1_handle_timeout() calls dtls1_double_timeout() which was calling dtls1_start_timer(). However dtls1_start_timer() is also called directly by dtls1_handle_timeout(). We only need to start the timer once. Fixes #15561 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15595)
Diffstat (limited to 'ssl/d1_lib.c')
-rw-r--r--ssl/d1_lib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index f9ad4ed684..a986252866 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -342,12 +342,11 @@ int dtls1_is_timer_expired(SSL *s)
return 1;
}
-void dtls1_double_timeout(SSL *s)
+static void dtls1_double_timeout(SSL *s)
{
s->d1->timeout_duration_us *= 2;
if (s->d1->timeout_duration_us > 60000000)
s->d1->timeout_duration_us = 60000000;
- dtls1_start_timer(s);
}
void dtls1_stop_timer(SSL *s)