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.
This commit is contained in:
Sergiy Prykhodko 2013-09-21 12:05:00 +03:00 committed by Willy Tarreau
parent a33410cf94
commit 1d57e50810

View 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);
}
}
}