Skip to content

Commit f66bfcf

Browse files
committed
BUG/MINOR: mux_quic: make sure to always apply offsets to now_ms in expiration
Now_ms can be zero nowadays, so it's not suitable for direct assignment to t->expire, as there's a risk that the timer never wakes up once assigned (TICK_ETERNITY). Let's use tick_add(now_ms, 0) for an immediate wakeup instead. The impact looks nul since the task is also woken up, but better not leave such tasks in the timer tree anyway. This should be backported where it applies.
1 parent 841be4c commit f66bfcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mux_quic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ static void qcc_refresh_timeout(struct qcc *qcc)
366366
/* We are past the soft close window end, wake the timeout
367367
* task up immediately.
368368
*/
369-
qcc->task->expire = now_ms;
369+
qcc->task->expire = tick_add(now_ms, 0);
370370
task_wakeup(qcc->task, TASK_WOKEN_TIMER);
371371
}
372372
}

0 commit comments

Comments
 (0)