Check for POLLERR, POLLHUP and POLLNVAL for Solaris event ports

This commit is contained in:
Trond Norbye 2011-01-02 10:17:15 +01:00 committed by Nick Mathewson
parent cb8059d2d3
commit 0144886e7e

View File

@ -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]);