]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
ioloop-epoll: Fix fatal epoll_wait() error occurring when there are only ios with...
authorStephan Bosch <stephan@rename-it.nl>
Sat, 29 Aug 2015 11:21:27 +0000 (14:21 +0300)
committerStephan Bosch <stephan@rename-it.nl>
Sat, 29 Aug 2015 11:21:27 +0000 (14:21 +0300)
src/lib/ioloop-epoll.c

index bddb51ed92a79878dae5255cb0fa24d812fd0b2e..9ccfeeaa4c11ab7e8defa5dd9cc4d1fda5b15fdb 100644 (file)
@@ -177,7 +177,7 @@ void io_loop_handler_run_internal(struct ioloop *ioloop)
        msecs = io_loop_get_wait_time(ioloop, &tv);
 
        events = array_get_modifiable(&ctx->events, &events_count);
-       if (ioloop->io_files != NULL) {
+       if (ioloop->io_files != NULL && events_count > ctx->deleted_count) {
                ret = epoll_wait(ctx->epfd, events, events_count, msecs);
                if (ret < 0 && errno != EINTR)
                        i_fatal("epoll_wait(): %m");