BUG/MINOR: server: decrement session idle_conns on del server
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 19 Aug 2025 13:41:43 +0000 (15:41 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Oct 2025 14:48:34 +0000 (16:48 +0200)
commitb2fca785fb60af9f322c96ceec01abce760582d1
tree04ffc6ab88d8df6cd103dd3923a8a39fc8ceddea
parent9cbd281ab6a1db34dcdd60dabd927c1dea591886
BUG/MINOR: server: decrement session idle_conns on del server

When a server is deleted, each of its idle connections are removed. This
is also performed for every private connections stored on sessions which
referenced the target server.

As mentionned above, these private connections are idle, guaranteed by
srv_check_for_deletion(). A BUG_ON() on CO_FL_SESS_IDLE is already
present to guarantee this. Thus, these connections are accounted on the
session to enforce max-session-srv-conns limit.

However, this counter is not decremented during private conns cleanup on
"del server" handler. This patch fixes this by adding a decrement for
every private connections removed via "del server".

This should be backported up to 3.0.

(cherry picked from commit 0be225f341485a46d17bc17ccc7906613bfbc3d0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 15805ddc6ddfcde5e0b777f295f2fce1bef2d01a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f8d6215a9e4a1442ece0b7fcef10ab24c6f83973)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/server.c