mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
[MINOR] allow null timeouts for past events in select
This commit is contained in:
parent
79b8a62ff6
commit
d9b744104e
@ -90,6 +90,7 @@ REGPRM2 static void _do_poll(struct poller *p, struct timeval *exp)
|
||||
/* allow select to return immediately when needed */
|
||||
delta.tv_sec = delta.tv_usec = 0;
|
||||
if (tv_isset(exp)) {
|
||||
if (tv_islt(&now, exp)) {
|
||||
tv_remain(&now, exp, &delta);
|
||||
/* To avoid eventual select loops due to timer precision */
|
||||
delta.tv_usec += SCHEDULER_RESOLUTION * 1000;
|
||||
@ -98,6 +99,7 @@ REGPRM2 static void _do_poll(struct poller *p, struct timeval *exp)
|
||||
delta.tv_sec ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* let's restore fdset state */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user