]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: h2: always subscribe to receive if allowed.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 17 Aug 2018 16:42:48 +0000 (18:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Sep 2018 15:37:55 +0000 (17:37 +0200)
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.

src/mux_h2.c

index af28383a340236852bd34f1d0fc573991a37dd4a..c6fa1c90cea590c61dae75b742413959b10cfbe3 100644 (file)
@@ -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;
        }