From cef5c8e2aa826a5556cd90e44453ed08277c0fb4 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 18 Dec 2018 10:29:54 +0100 Subject: [PATCH] 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. --- src/mux_h2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }