From 2883fcf65bc09d4acf25561bcd955c6ca27c0438 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 1 Jul 2020 14:59:43 +0200 Subject: [PATCH] BUG/MINOR: connection: See new connection as available only on reuse always When the multiplexer creation is delayed after the handshakes phase, the connection is added in the available connection list if http-reuse never is not configured for the backend. But it is a wrong statement. At this step, the connection is not safe because it is a new connection. So it must be added in the available connection list only if http-reuse always is used. No backport needed, this is 2.2-dev. --- src/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index 56921bec5..11b174767 100644 --- a/src/connection.c +++ b/src/connection.c @@ -60,7 +60,7 @@ int conn_create_mux(struct connection *conn) else if (conn_install_mux_be(conn, conn->ctx, conn->owner) < 0) goto fail; srv = objt_server(conn->target); - if (srv && ((srv->proxy->options & PR_O_REUSE_MASK) != PR_O_REUSE_NEVR) && + if (srv && ((srv->proxy->options & PR_O_REUSE_MASK) == PR_O_REUSE_ALWS) && !(conn->flags & CO_FL_PRIVATE) && conn->mux->avail_streams(conn) > 0) LIST_ADDQ(&srv->available_conns[tid], mt_list_to_list(&conn->list)); return 0;