mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s3-events: If immediate requests are pending, the timeout is 0
This commit is contained in:
parent
ebb79e27dc
commit
ad91ef7f96
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user