From: Willy Tarreau Date: Tue, 18 Dec 2018 09:29:54 +0000 (+0100) Subject: BUG/MEDIUM: mux-h2: restart demuxing as soon as demux data are available X-Git-Tag: v1.9.0~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cef5c8e2aa826a5556cd90e44453ed08277c0fb4;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mux-h2: restart demuxing as soon as demux data are available Commit 7505f94f9 ("MEDIUM: h2: Don't use a wake() method anymore.") changed the conditions to restart demuxing so that this happens as soon as something is read. But similar to previous fix, at an end of stream we may be woken up with nothing to read but data still available in the demux buffer, so we must also use this as a valid condition for demuxing. No backport is needed, this is purely 1.9. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 1f26701526..619df62c36 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2583,7 +2583,7 @@ static struct task *h2_io_cb(struct task *t, void *ctx, unsigned short status) ret = h2_send(h2c); if (!(h2c->wait_event.wait_reason & SUB_CAN_RECV)) ret |= h2_recv(h2c); - if (ret) + if (ret || b_data(&h2c->dbuf)) h2_process(h2c); return NULL; }