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.
This commit is contained in:
Amaury Denoyelle 2025-08-21 17:30:10 +02:00
parent a96f1286a7
commit 04f05f1880

View File

@ -2962,7 +2962,6 @@ int conn_reverse(struct connection *conn)
srv_use_conn(srv, conn); srv_use_conn(srv, conn);
/* Free the session after detaching the connection from it. */ /* Free the session after detaching the connection from it. */
session_unown_conn(sess, conn);
sess->origin = NULL; sess->origin = NULL;
session_free(sess); session_free(sess);
conn_set_owner(conn, NULL, NULL); conn_set_owner(conn, NULL, NULL);