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.
This commit is contained in:
Willy Tarreau 2018-12-18 10:29:54 +01:00
parent c5b1004fbe
commit cef5c8e2aa
1 changed files with 1 additions and 1 deletions

View 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;
}