From aaf1f19e8bab03de5eba53021fb79054db68cabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Tue, 22 Mar 2022 15:37:41 +0100 Subject: [PATCH] MINOR: quic: Add traces in qc_set_timer() (scheduling) This should be helpful to diagnose some issues: timer task not run when it should run. --- src/xprt_quic.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 2aba3f628..4e14bad6e 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -657,10 +657,14 @@ static inline void qc_set_timer(struct quic_conn *qc) qc->timer = pto; out: if (qc->timer_task && qc->timer != TICK_ETERNITY) { - if (tick_is_expired(qc->timer, now_ms)) + if (tick_is_expired(qc->timer, now_ms)) { + TRACE_PROTO("wakeup asap timer task", QUIC_EV_CONN_STIMER, qc); task_wakeup(qc->timer_task, TASK_WOKEN_MSG); - else + } + else { + TRACE_PROTO("timer task scheduling", QUIC_EV_CONN_STIMER, qc); task_schedule(qc->timer_task, qc->timer); + } } TRACE_LEAVE(QUIC_EV_CONN_STIMER, qc, pktns); }