]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: session: do not release conn in session_check_idle_conn()
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 24 Jul 2025 09:29:50 +0000 (11:29 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 30 Jul 2025 09:43:41 +0000 (11:43 +0200)
commitdd9645d6b9fd48e81bb25ec6f64f86fabcbd8924
treee5eadb8a8b936309ed058e37c11d0d374f1c61f7
parent57e9425dbcd2fa943d52f6a7c89b66c2bbfc5ce9
MINOR: session: do not release conn in session_check_idle_conn()

session_check_idle_conn() is called to flag a connection already
inserted in a session list as idle. If the session limit on the number
of idle connections (max-session-srv-conns) is exceeded, the connection
is removed from the session list.

In addition to the connection removal, session_check_idle_conn()
directly calls MUX destroy callback on the connection. This means the
connection is freed by the function itself and should not be used by the
caller anymore.

This is not practical when an alternative connection closure method
should be used, such as a graceful shutdown with QUIC. As such, remove
MUX destroy invokation : this is now the responsability of the caller to
either close or release immediately the connection.
include/haproxy/session.h
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mux_quic.c
src/mux_spop.c