Merge remote branch 'origin/patches-2.0'

This commit is contained in:
Nick Mathewson 2011-01-06 12:44:45 -05:00
commit f1e9a7e7e4

View File

@ -341,6 +341,12 @@ evport_dispatch(struct event_base *base, struct timeval *tv)
if (pevt->portev_events & POLLOUT) if (pevt->portev_events & POLLOUT)
res |= EV_WRITE; 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); EVUTIL_ASSERT(epdp->ed_nevents > fd);
fdi = &(epdp->ed_fds[fd]); fdi = &(epdp->ed_fds[fd]);