From: Sergiy Prykhodko Date: Sat, 21 Sep 2013 09:05:00 +0000 (+0300) Subject: BUG/MINOR: fix forcing fastinter in "on-error" X-Git-Tag: v1.5-dev20~279 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d57e508104ccd085c1e70d147edcba9f6960c1b;p=thirdparty%2Fhaproxy.git BUG/MINOR: fix forcing fastinter in "on-error" health_adjust() should requeue the task after changing its expire timer. I noticed it on devel servers without load. We have long inter (10 seconds) and short fasinter (100ms). But according to webserver logs, after a failed request next check request was called with same 10s interval. This patch should probably be backported to 1.4 which has the same feature. --- diff --git a/src/checks.c b/src/checks.c index 315ef7a832..512eb2e1e1 100644 --- a/src/checks.c +++ b/src/checks.c @@ -693,8 +693,11 @@ void health_adjust(struct server *s, short status) if (s->fastinter) { expire = tick_add(now_ms, MS_TO_TICKS(s->fastinter)); - if (s->check.task->expire > expire) + if (s->check.task->expire > expire) { s->check.task->expire = expire; + /* requeue check task with new expire */ + task_queue(s->check.task); + } } }