summaryrefslogtreecommitdiff
path: root/evport.c
diff options
context:
space:
mode:
Diffstat (limited to 'evport.c')
-rw-r--r--evport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/evport.c b/evport.c
index 082e20ab..4d341621 100644
--- a/evport.c
+++ b/evport.c
@@ -342,6 +342,12 @@ evport_dispatch(struct event_base *base, struct timeval *tv)
if (pevt->portev_events & POLLOUT)
res |= EV_WRITE;
+ /*
+ * Check for the error situations or a hangup situation
+ */
+ if (pevt->portev_events & (POLLERR|POLLHUP|POLLNVAL))
+ res |= EV_READ|EV_WRITE;
+
EVUTIL_ASSERT(epdp->ed_nevents > fd);
fdi = &(epdp->ed_fds[fd]);