]> granicus.if.org Git - libevent/commitdiff
Check for POLLERR, POLLHUP and POLLNVAL for Solaris event ports
authorTrond Norbye <trond.norbye@gmail.com>
Sun, 2 Jan 2011 09:17:15 +0000 (10:17 +0100)
committerNick Mathewson <nickm@torproject.org>
Thu, 6 Jan 2011 17:43:53 +0000 (12:43 -0500)
evport.c

index 4301a39c7f3213ea81664ad97ade568fbb2be725..e77f2b2992ae5acdcab08b281476786c85143539 100644 (file)
--- 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]);