From: Christopher Faulet Date: Fri, 17 Nov 2023 14:34:23 +0000 (+0100) Subject: BUG/MINOR: stconn: Report read activity on non-indep streams for partial sends X-Git-Tag: v2.9-dev10~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ed101e09c245c7e4100f8bc4db3466449513263;p=thirdparty%2Fhaproxy.git 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. --- 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.