BUG/MINOR: backend: fix wrong BUG_ON for avail conn
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 24 Oct 2023 16:31:28 +0000 (18:31 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 25 Oct 2023 08:11:04 +0000 (10:11 +0200)
commitb9fbbaf2a88f775f73496c20e944b124292215e5
tree62338327e5d5e437e06119390dcdbdaf860af5a8
parent8da0e45382feb74c39492c7d066f1b445d03ec73
BUG/MINOR: backend: fix wrong BUG_ON for avail conn

Idle connections are both stored in an idle/safe tree and in an idle
list. The list is used as a secondary storage to be able to retrieve
them by usage order.

If a connection is moved into the available tree, it must not be present
in the idle list. A BUG_ON() was written to check this but was placed at
the wrong code section. Fix this by removing the misplaced one and write
new ones for avail_conns tree insertion and lookup.

The impact of this bug is minor as the misplaced BUG_ON() did not seem
to be triggered.

No need to backport.
src/backend.c