mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
[BUG] wqueue: perform proper timeout comparisons with wrapping values
With wrapping keys, we cannot simply do "if (key > now)", but we must at least do "if ((signed)(key-now) > 0)".
This commit is contained in:
parent
accc4e1e86
commit
e62bdd4026
@ -148,7 +148,7 @@ void wake_expired_tasks(struct timeval *next)
|
||||
struct eb32_node *next_eb;
|
||||
|
||||
task = eb32_entry(eb, struct task, eb);
|
||||
if (eb->key > now_key) {
|
||||
if ((signed)(eb->key - now_key) > 0) {
|
||||
*next = task->expire;
|
||||
timers.first = task->expire;
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user