mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
BUG/MEDIUM: connections: Set CO_FL_CONNECTED in conn_complete_session().
We can't just assume conn_create_mux() will be called, and set CO_FL_CONNECTED, conn_complete_session() might be call synchronously if we're not using SSL, so ew haee no choice but to set CO_FL_CONNECTED in there. This should fix the recent breakage of the mcli reg tests.
This commit is contained in:
parent
dad239d08b
commit
a8a415d31a
@ -43,16 +43,16 @@ struct mux_proto_list mux_proto_list = {
|
|||||||
|
|
||||||
int conn_create_mux(struct connection *conn)
|
int conn_create_mux(struct connection *conn)
|
||||||
{
|
{
|
||||||
/* Verify if the connection just established. */
|
|
||||||
if (unlikely(!(conn->flags & (CO_FL_WAIT_L4_CONN | CO_FL_WAIT_L6_CONN | CO_FL_CONNECTED))))
|
|
||||||
conn->flags |= CO_FL_CONNECTED;
|
|
||||||
|
|
||||||
if (conn_is_back(conn)) {
|
if (conn_is_back(conn)) {
|
||||||
struct server *srv;
|
struct server *srv;
|
||||||
struct conn_stream *cs = conn->ctx;
|
struct conn_stream *cs = conn->ctx;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_ERROR)
|
if (conn->flags & CO_FL_ERROR)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
/* Verify if the connection just established. */
|
||||||
|
if (unlikely(!(conn->flags & (CO_FL_WAIT_L4_CONN | CO_FL_WAIT_L6_CONN | CO_FL_CONNECTED))))
|
||||||
|
conn->flags |= CO_FL_CONNECTED;
|
||||||
|
|
||||||
if (conn_install_mux_be(conn, conn->ctx, conn->owner) < 0)
|
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);
|
||||||
|
@ -433,6 +433,10 @@ int conn_complete_session(struct connection *conn)
|
|||||||
if (conn->flags & CO_FL_ERROR)
|
if (conn->flags & CO_FL_ERROR)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
/* Verify if the connection just established. */
|
||||||
|
if (unlikely(!(conn->flags & (CO_FL_WAIT_L4_CONN | CO_FL_WAIT_L6_CONN | CO_FL_CONNECTED))))
|
||||||
|
conn->flags |= CO_FL_CONNECTED;
|
||||||
|
|
||||||
/* if logs require transport layer information, note it on the connection */
|
/* if logs require transport layer information, note it on the connection */
|
||||||
if (sess->fe->to_log & LW_XPRT)
|
if (sess->fe->to_log & LW_XPRT)
|
||||||
conn->flags |= CO_FL_XPRT_TRACKED;
|
conn->flags |= CO_FL_XPRT_TRACKED;
|
||||||
|
Loading…
Reference in New Issue
Block a user