diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tevent/tevent_select.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tevent/tevent_select.c b/lib/tevent/tevent_select.c index 1598094d2d..8cc6d06a59 100644 --- a/lib/tevent/tevent_select.c +++ b/lib/tevent/tevent_select.c @@ -116,7 +116,8 @@ static struct tevent_fd *select_event_add_fd(struct tevent_context *ev, TALLOC_C handler_name, location); if (!fde) return NULL; - if (fde->fd > select_ev->maxfd) { + if ((select_ev->maxfd != EVENT_INVALID_MAXFD) + && (fde->fd > select_ev->maxfd)) { select_ev->maxfd = fde->fd; } talloc_set_destructor(fde, select_event_fd_destructor); |