From 04a24c5eaa4368b2ff7cd67d2b9e310a3995e1b3 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 14 Oct 2020 18:17:07 +0200 Subject: [PATCH] MINOR: connection: don't check priv flag on free Do not check CO_FL_PRIVATE flag to check if the connection is in session list on conn_free. This is necessary due to the future patches which add server connections in the session list even if not private, if the mux protocol is the subject of HOL blocking. --- include/haproxy/connection.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/haproxy/connection.h b/include/haproxy/connection.h index 37d3f4280f..b99df4d002 100644 --- a/include/haproxy/connection.h +++ b/include/haproxy/connection.h @@ -464,12 +464,10 @@ static inline void conn_force_unsubscribe(struct connection *conn) /* Releases a connection previously allocated by conn_new() */ static inline void conn_free(struct connection *conn) { - if (conn->flags & CO_FL_PRIVATE) { - /* The connection is private, so remove it from the session's - * connections list, if any. - */ - if (LIST_ADDED(&conn->session_list)) - session_unown_conn(conn->owner, conn); + /* If the connection is owned by the session, remove it from its list + */ + if (LIST_ADDED(&conn->session_list)) { + session_unown_conn(conn->owner, conn); } else { if (obj_type(conn->target) == OBJ_TYPE_SERVER) -- 2.39.5