]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: connections: Don't forget to detach the connection from the SI.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 29 Nov 2018 15:58:49 +0000 (16:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 29 Nov 2018 16:39:04 +0000 (17:39 +0100)
When we're deferring the mux choice until the ALPN is negociated, we
attach the connection to the stream_interface until it's done, so that we
can destroy it if something goes wrong and the stream is destroy.
Before calling si_attach_cs() to attach the conn_stream once we have it,
call si_detach_endpoint(), or is_attach_cs() would destroy the connection.

src/backend.c

index 29a21dab613f0e124166f694dc3bbc6933ca2870..7a2168acc87c3c6279bf7be4727a2c9a6e84d6f4 100644 (file)
@@ -1056,6 +1056,7 @@ static int conn_complete_server(struct connection *conn)
                goto fail;
        if (conn->flags & CO_FL_ERROR)
                goto fail;
+       si_detach_endpoint(&s->si[1]);
        cs = si_alloc_cs(&s->si[1], conn);
        if (!cs)
                goto fail;