From: Amaury Denoyelle Date: Wed, 14 Oct 2020 16:17:07 +0000 (+0200) Subject: MINOR: connection: don't check priv flag on free X-Git-Tag: v2.3-dev7~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04a24c5ea;p=thirdparty%2Fhaproxy.git 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. --- 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)