summaryrefslogtreecommitdiff
path: root/evport.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-01-06 12:44:45 -0500
committerNick Mathewson <nickm@torproject.org>2011-01-06 12:44:45 -0500
commitf1e9a7e7e442f80b61a2dd6f0c8f1f5ce456b033 (patch)
treea948c4b23b46a7af91a2a1143a7f0e46fc64b03e /evport.c
parentac6904241be9bf56e1de7d6e1f780134359dbd2e (diff)
parent0144886e7e9fdfb5dc630dcf0567846b952994bd (diff)
downloadlibevent-f1e9a7e7e442f80b61a2dd6f0c8f1f5ce456b033.tar.gz
Merge remote branch 'origin/patches-2.0'
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 4301a39c..e77f2b29 100644
--- a/evport.c
+++ b/evport.c
@@ -341,6 +341,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]);