]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: servers: Flag the stream_interface on handshake error.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 27 Dec 2018 17:59:46 +0000 (18:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Dec 2018 15:33:22 +0000 (16:33 +0100)
When creating a new outgoing connection, if we're using ALPN and waiting
for the handshake completion to choose the mux, and for some reason the
handshake failed, add the SI_FL_ERR flag to the stream_interface, so that
process_streams() knows the connection failed, and can attempt to retry,
instead of just hanging.

This should be backported to 1.9.

src/backend.c

index babe96eb8657ad7a98aca34eabe90cd800a54ba5..c4711ead88bb1c01c1c17126412e5a5bc8334b1e 100644 (file)
@@ -1089,6 +1089,8 @@ fail:
        conn_stop_tracking(conn);
        conn_full_close(conn);
        conn_free(conn);
+       /* Let process_stream know it went wrong */
+       s->si[1].flags |= SI_FL_ERR;
        return -1;
 }
 #endif