BUG/MEDIUM: mux-h2: also restart demuxing when data are pending in demux

Commit 082f559d3 ("BUG/MEDIUM: h2: restart demuxing after releasing
buffer space") tried to address a situation where transfers could stall
after a read, but the condition was not completely covered : some stalls
may still happen at end of stream because there's nothing anymore to
receive and the last data lie in the demux buffer. Thus we must also
consider this state as a valid condition to restart demuxing.

No backport is needed.
This commit is contained in:
Willy Tarreau 2018-12-18 10:27:18 +01:00
parent 7ab99a302d
commit c5b1004fbe
1 changed files with 1 additions and 1 deletions

View File

@ -4631,7 +4631,7 @@ static size_t h2_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
if (ret && h2c->dsi == h2s->id) {
/* demux is blocking on this stream's buffer */
h2c->flags &= ~H2_CF_DEM_SFULL;
if (!(h2c->wait_event.wait_reason & SUB_CAN_RECV)) {
if (b_data(&h2c->dbuf) || !(h2c->wait_event.wait_reason & SUB_CAN_RECV)) {
if (h2_recv_allowed(h2c))
tasklet_wakeup(h2c->wait_event.task);
}