mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
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.
This commit is contained in:
parent
aa27853ce2
commit
2883fcf65b
@ -60,7 +60,7 @@ int conn_create_mux(struct connection *conn)
|
|||||||
else if (conn_install_mux_be(conn, conn->ctx, conn->owner) < 0)
|
else if (conn_install_mux_be(conn, conn->ctx, conn->owner) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
srv = objt_server(conn->target);
|
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)
|
!(conn->flags & CO_FL_PRIVATE) && conn->mux->avail_streams(conn) > 0)
|
||||||
LIST_ADDQ(&srv->available_conns[tid], mt_list_to_list(&conn->list));
|
LIST_ADDQ(&srv->available_conns[tid], mt_list_to_list(&conn->list));
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user