summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ev_epoll.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ev_epoll.c b/ev_epoll.c
index eb22ad8..d0caa93 100644
--- a/ev_epoll.c
+++ b/ev_epoll.c
@@ -143,11 +143,12 @@ epoll_poll (EV_P_ ev_tstamp timeout)
{
int i;
int eventcnt;
-
+
/* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */
/* the default libev max wait time, however. */
EV_RELEASE_CB;
- eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, (int)ceil (timeout * 1000.));
+ eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax,
+ epoll_epermcnt ? 0 : (int)ceil (timeout * 1000.));
EV_ACQUIRE_CB;
if (expect_false (eventcnt < 0))