From: Olivier Houchard Date: Fri, 17 Aug 2018 16:42:48 +0000 (+0200) Subject: MEDIUM: h2: always subscribe to receive if allowed. X-Git-Tag: v1.9-dev2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1411e62e4da1c4013539b58e2e46d2fcc239a9c;p=thirdparty%2Fhaproxy.git MEDIUM: h2: always subscribe to receive if allowed. Let the connection layer know we're always interested in getting more data, so that we get scheduled as soon as data is available, instead of relying on the wake() method. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index af28383a34..c6fa1c90ce 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2256,8 +2256,9 @@ static int h2_recv(struct h2c *h2c) if (max) conn->xprt->rcv_buf(conn, buf, max, 0); - if (!b_data(buf)) { + if (h2_recv_allowed(h2c)) conn->xprt->subscribe(conn, SUB_CAN_RECV, &h2c->wait_list); + if (!b_data(buf)) { h2_release_buf(h2c, &h2c->dbuf); return 0; }