From dea329828271fee1e92f43043abb90ea3fef590a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Wed, 8 Feb 2023 17:43:13 +0100 Subject: [PATCH] BUG/MINOR: quic: Really cancel the connection timer from qc_set_timer() The ->expire field of the timer task to be cancelled was not reset to TICK_ETERNITY. Must be backported to 2.6 and 2.7. --- src/quic_conn.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/quic_conn.c b/src/quic_conn.c index 503e7bb84e..419d1c6703 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -782,8 +782,11 @@ static inline void qc_set_timer(struct quic_conn *qc) if (tick_isset(pto)) qc->timer = pto; out: - if (qc->timer_task && qc->timer != TICK_ETERNITY) { - if (tick_is_expired(qc->timer, now_ms)) { + if (qc->timer_task) { + if (qc->timer == TICK_ETERNITY) { + qc->timer_task->expire = TICK_ETERNITY; + } + else if (tick_is_expired(qc->timer, now_ms)) { TRACE_DEVEL("wakeup asap timer task", QUIC_EV_CONN_STIMER, qc); task_wakeup(qc->timer_task, TASK_WOKEN_MSG); } -- 2.47.3