diff options
-rw-r--r-- | source3/lib/events.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c index 90d86c6c79..6fc3a9727b 100644 --- a/source3/lib/events.c +++ b/source3/lib/events.c @@ -70,6 +70,11 @@ bool event_add_to_select_args(struct tevent_context *ev, } } + if (ev->immediate_events != NULL) { + *timeout = timeval_zero(); + return true; + } + if (ev->timer_events == NULL) { return ret; } @@ -140,6 +145,10 @@ struct timeval *get_timed_events_timeout(struct tevent_context *ev, if (ev->timer_events == NULL) { return NULL; } + if (ev->immediate_events != NULL) { + *to_ret = timeval_zero(); + return to_ret; + } now = timeval_current(); *to_ret = timeval_until(&now, &ev->timer_events->next_event); |