summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/check.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/check.c b/src/check.c
index a440185da..786c1c61c 100644
--- a/src/check.c
+++ b/src/check.c
@@ -1327,8 +1327,13 @@ struct task *process_chk_conn(struct task *t, void *context, unsigned int state)
}
reschedule:
- while (tick_is_expired(t->expire, now_ms))
- t->expire = tick_add(t->expire, MS_TO_TICKS(check->inter));
+ if (proxy->flags & (PR_FL_DISABLED|PR_FL_STOPPED))
+ t->expire = TICK_ETERNITY;
+ else {
+ while (tick_is_expired(t->expire, now_ms))
+ t->expire = tick_add(t->expire, MS_TO_TICKS(check->inter));
+ }
+
out_unlock:
if (check->server)
HA_SPIN_UNLOCK(SERVER_LOCK, &check->server->lock);