mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
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.
This commit is contained in:
parent
f950c2e97e
commit
67878d7bdc
@ -1134,10 +1134,10 @@ void soft_stop(void)
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user