From 5ed101e09c245c7e4100f8bc4db3466449513263 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 17 Nov 2023 15:34:23 +0100 Subject: [PATCH] BUG/MINOR: stconn: Report read activity on non-indep streams for partial sends Partial sends is an activity, not a full blocking. Thus a read activity must be reported for non-independent stream. It is especially important for very congested stream where full sends are uncommon. This patch must be backported to 2.8. --- include/haproxy/stconn.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/haproxy/stconn.h b/include/haproxy/stconn.h index fa2a6726bd..6ad5652ae5 100644 --- a/include/haproxy/stconn.h +++ b/include/haproxy/stconn.h @@ -183,11 +183,17 @@ static forceinline void sc_ep_report_read_activity(struct stconn *sc) /* Report a send blocked. This function sets to now_ms if it was not * already set or if something was sent (to renew ). + * + * if somehting was sent ( != 0), a read activity is also reported for + * non-independent stream. */ static forceinline void sc_ep_report_blocked_send(struct stconn *sc, int did_send) { - if (did_send || !tick_isset(sc->sedesc->fsb)) + if (did_send || !tick_isset(sc->sedesc->fsb)) { sc->sedesc->fsb = now_ms; + if (did_send && !(sc->flags & SC_FL_INDEP_STR)) + sc_ep_report_read_activity(sc); + } } /* Report a send activity by setting to TICK_ETERNITY.