BUG/MINOR: proxy: make soft_stop() also close FDs in LI_PAUSED state
The proxies' soft_stop() function closes the FDs in all opened states
except LI_PAUSED. This means that a transient error on a listener might
cause it to turn back to the READY state if it happens exactly when a
reload signal is received.
This must be backported to all supported versions.
(cherry picked from commit 67878d7bdcb88683bdbf6fba851901a31f348eb8)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 6967d100b6fe32bbe23c3e5d078a529380d54c37)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/src/proxy.c b/src/proxy.c
index 301d4d6..0e50680 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -1148,10 +1148,10 @@
if (p->state == PR_STSTOPPED &&
!LIST_ISEMPTY(&p->conf.listeners) &&
LIST_ELEM(p->conf.listeners.n,
- struct listener *, by_fe)->state >= LI_ZOMBIE) {
+ struct listener *, by_fe)->state > LI_ASSIGNED) {
struct listener *l;
list_for_each_entry(l, &p->conf.listeners, by_fe) {
- if (l->state >= LI_ZOMBIE)
+ if (l->state > LI_ASSIGNED)
close(l->fd);
l->state = LI_INIT;
}