diff options
author | Willy Tarreau <w@1wt.eu> | 2020-09-23 18:12:11 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2020-10-07 18:44:08 +0200 |
commit | 3ed9539d51ce1714ecb114d0487019b34ddade21 (patch) | |
tree | 58c1b1c7595b6e0f72e7e6f14388707ecbd92af1 | |
parent | 70a2ae9115932150e2734b601af7744d7f60d94c (diff) | |
download | haproxy-3ed9539d51ce1714ecb114d0487019b34ddade21.tar.gz |
MINOR: listeners: do not uselessly try to close zombie listeners in soft_stop()
The loop doesn't match anymore since the non-started listeners are in
LI_INIT and even if it had ever worked the benefit of closing zombies
at this point looks void at best.
-rw-r--r-- | src/proxy.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/proxy.c b/src/proxy.c index e23268d98..d5af92fc0 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -1237,21 +1237,6 @@ void soft_stop(void) p = proxies_list; tv_update_date(0,1); /* else, the old time before select will be used */ while (p) { - /* Zombie proxy, let's close the file descriptors */ - if (p->state == PR_STSTOPPED && - !LIST_ISEMPTY(&p->conf.listeners) && - LIST_ELEM(p->conf.listeners.n, - struct listener *, by_fe)->state > LI_ASSIGNED) { - struct listener *l; - list_for_each_entry(l, &p->conf.listeners, by_fe) { - if (l->state > LI_ASSIGNED) { - fd_delete(l->rx.fd); - l->rx.fd = -1; - } - l->state = LI_INIT; - } - } - if (p->state != PR_STSTOPPED) { ha_warning("Stopping %s %s in %d ms.\n", proxy_cap_str(p->cap), p->id, p->grace); send_log(p, LOG_WARNING, "Stopping %s %s in %d ms.\n", proxy_cap_str(p->cap), p->id, p->grace); |