]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h2: also terminate the connection on shutr
authorWilly Tarreau <w@1wt.eu>
Mon, 9 Oct 2017 14:47:04 +0000 (16:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:16:17 +0000 (18:16 +0100)
It happens that an H2 mux is totally unusable once the client has shut,
so we must consider this situation equivalent to the connection error,
and let the possible streams drain their data if needed then stop.

src/mux_h2.c

index 5457bc2c7eec9f7095cb51d0c60a2339fe2dab34..d69229f796bc6b40807f1f84d2079f5260fcb03b 100644 (file)
@@ -703,7 +703,8 @@ static int h2_wake(struct connection *conn)
 {
        struct h2c *h2c = conn->mux_ctx;
 
-       if (conn->flags & CO_FL_ERROR || h2c->st0 == H2_CS_ERROR2) {
+       if (conn->flags & CO_FL_ERROR || conn_xprt_read0_pending(conn) ||
+           h2c->st0 == H2_CS_ERROR2) {
                h2_wake_all_streams(h2c);
 
                if (eb_is_empty(&h2c->streams_by_id)) {