]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h2: restart demuxing as soon as demux data are available
authorWilly Tarreau <w@1wt.eu>
Tue, 18 Dec 2018 09:29:54 +0000 (10:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 18 Dec 2018 10:03:11 +0000 (11:03 +0100)
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

index 1f26701526724e16b5e8991bdc6088dd90d381ac..619df62c36dd3993fac41e34398995842c1c8727 100644 (file)
@@ -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;
 }