mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
[BUG] fix buggy timeout computation in wake_expired_tasks
Wake_expired_tasks is supposed to return a date, not an interval. It was causing busy loops in pollers.
This commit is contained in:
parent
bdefc513a0
commit
fbfc053e34
@ -96,7 +96,7 @@ void wake_expired_tasks(struct timeval *next)
|
|||||||
if (likely(timer_wq.data != NULL)) {
|
if (likely(timer_wq.data != NULL)) {
|
||||||
task = LIST_ELEM(timer_wq.data, struct task *, qlist);
|
task = LIST_ELEM(timer_wq.data, struct task *, qlist);
|
||||||
if (likely(tv_isgt(&task->expire, &now))) {
|
if (likely(tv_isgt(&task->expire, &now))) {
|
||||||
tv_remain(&now, &task->expire, next);
|
*next = task->expire;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ void wake_expired_tasks(struct timeval *next)
|
|||||||
task = LIST_ELEM(data, struct task *, qlist);
|
task = LIST_ELEM(data, struct task *, qlist);
|
||||||
|
|
||||||
if (tv_isgt(&task->expire, &now)) {
|
if (tv_isgt(&task->expire, &now)) {
|
||||||
tv_remain(&now, &task->expire, next);
|
*next = task->expire;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user