]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h2: Call h2_process() if there's an error on the connection.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 29 Nov 2018 16:06:17 +0000 (17:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 29 Nov 2018 16:39:04 +0000 (17:39 +0100)
In h2_recv(), return 1 if there's an error on the connection, not just if
there's a read0 pending, so that h2_process() can be called and act as a
janitor.

src/mux_h2.c

index 4914927eca8463bc51a4221623120bbc52931f9b..336bd4e0f906d1aa388b8ab38fcb846752318deb 100644 (file)
@@ -2258,7 +2258,7 @@ static int h2_recv(struct h2c *h2c)
 
        if (!b_data(buf)) {
                h2_release_buf(h2c, &h2c->dbuf);
-               return conn_xprt_read0_pending(conn);
+               return (conn->flags & CO_FL_ERROR || conn_xprt_read0_pending(conn));
        }
 
        if (b_data(buf) == buf->size)