mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-10 07:49:54 +00:00
BUG/MEDIUM: server: unwanted behavior leaving maintenance mode on tracked stopping server (take2)
Previous patch got accidently broken. This one fixes it.
This commit is contained in:
parent
e1e3947e7e
commit
6fb4ba38e0
@ -1184,9 +1184,13 @@ void srv_clr_admin_flag(struct server *s, enum srv_admin mode)
|
||||
(!(s->agent.state & CHK_ST_ENABLED) || (s->agent.health >= s->agent.rise)) &&
|
||||
(!(s->check.state & CHK_ST_ENABLED) || (s->check.health >= s->check.rise))) {
|
||||
|
||||
if (s->track && s->track->next_state == SRV_ST_STOPPING)
|
||||
if (s->track && s->track->next_state == SRV_ST_STOPPING) {
|
||||
if (s->last_change < now.tv_sec) // ignore negative times
|
||||
s->down_time += now.tv_sec - s->last_change;
|
||||
|
||||
s->last_change = now.tv_sec;
|
||||
s->next_state = SRV_ST_STOPPING;
|
||||
}
|
||||
else {
|
||||
if (s->proxy->srv_bck == 0 && s->proxy->srv_act == 0) {
|
||||
if (s->proxy->last_change < now.tv_sec) // ignore negative times
|
||||
|
Loading…
Reference in New Issue
Block a user