BUG/MEDIUM: spoe: Create a SPOE applet if necessary when the last one is released
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 2 Aug 2021 15:53:56 +0000 (17:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Aug 2021 15:07:05 +0000 (17:07 +0200)
commitfe7f615a27fc2995a492ecd77d81b1f34aa408f6
treeab9140f531702bd7186378c04634ee51c28f3981
parent0ee26e9b6d0b2163d5fb8b1d287dfe090fb25008
BUG/MEDIUM: spoe: Create a SPOE applet if necessary when the last one is released

On a thread, when the last SPOE applet is released, if there are still
pending streams, a new one is created. Of course, HAproxy must not be
stopping. It is important to start a new applet in this case to not abort
in-progress jobs, especially when a maxconn is set. Because applets may be
closed to be fair with connections waiting for a free slot.

This patch should partely fix the issue #1340. It depends on the commit
"MINOR: spoe: Create a SPOE applet if necessary when the last one on a
thread is closed". Both must be backported as far as 2.0.

(cherry picked from commit 6f1296b5c70d2f513836b61cfb9a06aed2db10eb)
[wt: previous patch to be picked is in fact "MINOR: spoe: Add a pointer
     on the filter config in the spoe_agent structure"]
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 4d350af9da9a417717468d49c45d5c59ff740c80)
[wt: context updates (LIST_DEL vs LISTçDELETE): reindent displaced block
     instead]
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/flt_spoe.c