Skip to content

Commit

Permalink
Check for POLLERR, POLLHUP and POLLNVAL for Solaris event ports
Browse files Browse the repository at this point in the history
  • Loading branch information
trondn authored and nmathewson committed Jan 6, 2011
1 parent cb8059d commit 0144886
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions evport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down

0 comments on commit 0144886

Please sign in to comment.