summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/events.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/events.c b/source4/lib/events.c
index 3263be08f1..166cbe4509 100644
--- a/source4/lib/events.c
+++ b/source4/lib/events.c
@@ -290,7 +290,11 @@ int event_loop_once(struct event_context *ev)
* sys_select() with something in the events
* structure - for now just use select()
*/
- selrtn = select(ev->maxfd+1, &r_fds, &w_fds, NULL, &tval);
+ if (timeval_is_zero(&tval)) {
+ selrtn = select(ev->maxfd+1, &r_fds, &w_fds, NULL, NULL);
+ } else {
+ selrtn = select(ev->maxfd+1, &r_fds, &w_fds, NULL, &tval);
+ }
t = timeval_current();