mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s3-events: If immediate requests are pending, the timeout is 0
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user