From 04f05f188058e8931f203efc44f72a009bc85c0f Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 21 Aug 2025 17:30:10 +0200 Subject: [PATCH] BUG/MINOR: connection: remove extra session_unown_conn() on reverse When a connection is reversed via rhttp protocol on the edge endpoint, it migrates from frontend to backend side. This operation is performed by conn_reverse(). During this transition, the conn owning session is freed as it becomes unneeded. Prior to this patch, session_unown_conn() was also called during frontend to backend migration. However, this is unnecessary as this function is only used for backend connection reuse. As such, this patch removes this unnecessary call. This does not cause any harm to the process as session_unown_conn() can handle a connection not inserted yet. However, for clarity purpose it's better to backport this patch up to 3.0. --- src/connection.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index ea4a0b27b..be03b0d47 100644 --- a/src/connection.c +++ b/src/connection.c @@ -2962,7 +2962,6 @@ int conn_reverse(struct connection *conn) srv_use_conn(srv, conn); /* Free the session after detaching the connection from it. */ - session_unown_conn(sess, conn); sess->origin = NULL; session_free(sess); conn_set_owner(conn, NULL, NULL);