summaryrefslogtreecommitdiff
path: root/src/eloop.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-10-07 13:09:27 +0200
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-10-07 13:09:27 +0200
commit70bfc314e013b169d16e62cac671acf58f147dc7 (patch)
treee67f9e0a1066833dfc49a7de290e47c3c590a5f5 /src/eloop.c
parent0996ed38a06016e23fbc2f86fc08290cf5b829e3 (diff)
eloop: fix leaving dead FDs pollable
We used to remove dead FDs from the epoll-loop, but we should do this only if they are no longer readable. An FD might be dead/HUP but still readable. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'src/eloop.c')
-rw-r--r--src/eloop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eloop.c b/src/eloop.c
index 3badbbc..eabfeb2 100644
--- a/src/eloop.c
+++ b/src/eloop.c
@@ -836,7 +836,7 @@ int ev_eloop_dispatch(struct ev_eloop *loop, int timeout)
continue;
mask = convert_mask(ep[i].events);
- if (mask & EV_HUP)
+ if ((mask & (EV_ERR | EV_HUP)) == mask)
ev_fd_disable(fd);
fd->cb(fd, mask, fd->data);