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>
This commit is contained in:
parent
0996ed38a0
commit
70bfc314e0
@ -836,7 +836,7 @@ int ev_eloop_dispatch(struct ev_eloop *loop, int timeout)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
mask = convert_mask(ep[i].events);
|
mask = convert_mask(ep[i].events);
|
||||||
if (mask & EV_HUP)
|
if ((mask & (EV_ERR | EV_HUP)) == mask)
|
||||||
ev_fd_disable(fd);
|
ev_fd_disable(fd);
|
||||||
|
|
||||||
fd->cb(fd, mask, fd->data);
|
fd->cb(fd, mask, fd->data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user