mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUG/MEDIUM: proxy: properly stop backends
The proxy stopping mechanism was changed with commit 322b9b94e ("MEDIUM: proxy: make stop_proxy() now use stop_listener()") so that it's now entirely driven by the listeners. One thing was forgotten though, which is that pure backends will not stop anymore since they don't have any listener, and that it's necessary to stop them in order to stop the health checks. No backport is needed.
This commit is contained in:
parent
4a32103a48
commit
ba29687bc1
@ -1315,6 +1315,11 @@ void stop_proxy(struct proxy *p)
|
||||
list_for_each_entry(l, &p->conf.listeners, by_fe)
|
||||
stop_listener(l, 1, 0, 0);
|
||||
|
||||
if (!p->disabled && !p->li_ready) {
|
||||
/* might be just a backend */
|
||||
p->disabled = 1;
|
||||
}
|
||||
|
||||
HA_SPIN_UNLOCK(PROXY_LOCK, &p->lock);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user