From: Olivier Houchard Date: Fri, 28 Aug 2026 10:34:53 +0000 (+0200) Subject: BUG/MEDIUM: mux-h2: Make sure we remove H2_SF_NOTIFIED on subscribe X-Git-Tag: v3.5-dev6~3 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=55b6e5496edebabacafe9ae4456c31bc210610d0;p=haproxy.git BUG/MEDIUM: mux-h2: Make sure we remove H2_SF_NOTIFIED on subscribe The mux h2 remembers that he woke a stream for writing, and as long as the H2_SF_NOTIFIED flag is set, won't attempt to do so again. However, if for any reason the stream does not try to send data, and just subscribes, then it will never be woken up. So remove the flag on subscribe. This can happen for example, with tcpcheck using the proxy protocol, if for any reason the proxy protocol handshake is not done yet, as tcpcheck will just subscribe if it sees the CO_FL_WAIT_XPRT flag. This should be backported up to 2.8. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 92ababe06..d336fcad3 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -7923,6 +7923,12 @@ static int h2_subscribe(struct stconn *sc, int event_type, struct wait_event *es if (event_type & SUB_RETRY_SEND) { TRACE_DEVEL("subscribe(send)", H2_EV_STRM_SEND, h2c->conn, h2s); + /* + * If the caller subscribes, that means he was enable to send + * data, so let's not pretend it has already been notified + * he could, this is obviously obsolete. + */ + h2s->flags &= ~H2_SF_NOTIFIED; if (!(h2s->flags & H2_SF_BLK_SFCTL) && !LIST_INLIST(&h2s->list)) { if (h2s->flags & H2_SF_BLK_MFCTL) {