From 565f987e85011754ebb73da3b1d6e36d6e5cafac Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Tue, 8 Jul 2025 10:30:46 +0200 Subject: [PATCH] BUG/MINOR mux-quic: apply correctly timeout on output pending data When no stream is attached, mux layer is responsible to maintain a timeout. The first criteria is to apply client/server timeout if there is still data waiting for emission. Previously, qcc member was used to determine this state. However, this only covers bidirectional streams. Fix this by testing if is empty or not. This is enough to take into account both bidi and uni streams. Theorically, this should be backported to every stable versions. However, send-list is not available on 2.6 and there is no alternative to quickly determine if there is waiting output data. Thus, it's better to backport it up to 2.8 only. (cherry picked from commit c5bcc3a21ef371b81099cc0c6a4a27ae34d7726b) Signed-off-by: Amaury Denoyelle (cherry picked from commit 5806cae870c0a942ab5d0a54fb2db4cb2b70ae5f) Signed-off-by: Christopher Faulet (cherry picked from commit 5f0ff9fd3e469d0a9f08ba05966aee96c1f3009c) [ad: non existing qcc.tx.frms member in 3.0- (introduced with pacing)] Signed-off-by: Amaury Denoyelle --- src/mux_quic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mux_quic.c b/src/mux_quic.c index a678525..220127e 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -285,8 +285,8 @@ static void qcc_refresh_timeout(struct qcc *qcc) * processed if shutdown already one or connection is idle. */ if (!conn_is_back(qcc->conn)) { - if (qcc->nb_hreq && !(qcc->flags & QC_CF_APP_SHUT)) { - TRACE_DEVEL("one or more requests still in progress", QMUX_EV_QCC_WAKE, qcc->conn); + if (!LIST_ISEMPTY(&qcc->send_list)) { + TRACE_DEVEL("pending output data", QMUX_EV_QCC_WAKE, qcc->conn); qcc->task->expire = tick_add_ifset(now_ms, qcc->timeout); task_queue(qcc->task); goto leave; -- 1.7.10.4