BUG/MEDIUM: release lock on idle conn killing on reached pool high count
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 23 Mar 2021 09:44:43 +0000 (10:44 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 25 Mar 2021 10:55:35 +0000 (11:55 +0100)
commit65bf600cc3ced517196138fb4aad6d58d4dc4220
treecdb6829aab2c566e817fa9159e2799017c484d20
parentc23b33764ea88587193472283c3e2d7a88448392
BUG/MEDIUM: release lock on idle conn killing on reached pool high count

Release the lock before calling mux destroy in connect_server when
trying to kill an idle connection because the pool high count has been
reached.

The lock must be released because the mux destroy will call
srv_release_conn which also takes the lock to remove the connection from
the tree. As the connection was already deleted from the tree at this
stage, it is safe to release the lock, and the removal in
srv_release_conn will be a noop.

It does not need to be backported because it is only present in the
current release. It has been introduced by
    5c7086f6b06d546c5800486ed9e4bb8d8d471e09
    MEDIUM: connection: protect idle conn lists with locks
src/backend.c