]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h1: Don't wait for handshake if we had an error.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 13 Jun 2019 15:37:00 +0000 (17:37 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 13 Jun 2019 17:14:45 +0000 (19:14 +0200)
In h1_process(), only wait for the handshake if we had no error on the
connection. If the handshake failed, we have to let the upper layer know.

src/mux_h1.c

index 7fd07d35575eaa4137d4f55bbc9ce0bdffb3c9a2..0de669022747b6440b7dbd423d5d6789a4a7b09d 100644 (file)
@@ -1937,7 +1937,7 @@ static int h1_process(struct h1c * h1c)
 
        if (h1c->flags & H1C_F_CS_WAIT_CONN) {
                if (!(conn->flags & (CO_FL_CONNECTED|CO_FL_ERROR)) ||
-                   (conn->flags & CO_FL_HANDSHAKE))
+                   (!(conn->flags & CO_FL_ERROR) && (conn->flags & CO_FL_HANDSHAKE)))
                        goto end;
                h1c->flags &= ~H1C_F_CS_WAIT_CONN;
                h1_wake_stream_for_send(h1s);