]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: don't check priv flag on free
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 14 Oct 2020 16:17:07 +0000 (18:17 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 15 Oct 2020 13:19:34 +0000 (15:19 +0200)
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

index 37d3f4280fd4b7e8137231e87268237be36b7b7f..b99df4d002abbe69f13512cbde7d3a0221aa7d34 100644 (file)
@@ -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)