]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: poll: only rely on wake_expired_tasks() to compute the wait delay
authorThierry FOURNIER <tfournier@haproxy.com>
Mon, 15 Dec 2014 12:26:01 +0000 (13:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 28 Feb 2015 22:12:30 +0000 (23:12 +0100)
commit9cf7c4b9df2e050db972fe9c93a9befe980456f0
tree2a4479eec36ce0cf73eb8bb6ef3217d90412348b
parente7acee70a3f9dbc42da197d8dded37ad007bd480
MAJOR: poll: only rely on wake_expired_tasks() to compute the wait delay

Actually, HAProxy uses the function "process_runnable_tasks" and
"wake_expired_tasks" to get the next task which can expires.

If a task is added with "task_schedule" or other method during
the execution of an other task, the expiration of this new task
is not taken into account, and the execution of this task can be
too late.

Actualy, HAProxy seems to be no sensitive to this bug.

This fix moves the call to process_runnable_tasks() before the timeout
calculation and ensures that all wakeups are processed together. Only
wake_expired_tasks() needs to return a timeout now.
include/proto/task.h
src/haproxy.c
src/task.c