]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: fix forcing fastinter in "on-error"
authorSergiy Prykhodko <pservit@gmail.com>
Sat, 21 Sep 2013 09:05:00 +0000 (12:05 +0300)
committerWilly Tarreau <w@1wt.eu>
Mon, 23 Sep 2013 06:49:50 +0000 (08:49 +0200)
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.

src/checks.c

index 315ef7a832692a90b4854651b4051af0d00a679f..512eb2e1e1311b36e6d806dd306cd1ab88ba23f7 100644 (file)
@@ -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);
+               }
        }
 }