fix poll hup support

svn:r82
This commit is contained in:
Niels Provos 2003-09-25 23:07:09 +00:00
parent ec70653b61
commit f08bf5325e

6
poll.c
View File

@ -197,9 +197,9 @@ poll_dispatch(void *arg, struct timeval *tv)
if (pop->event_set[i].revents & POLLHUP)
pop->event_set[i].revents = POLLIN|POLLOUT;
if (pop->event_set[i].revents & POLLIN)
res = EV_READ;
else if (pop->event_set[i].revents & POLLOUT)
res = EV_WRITE;
res |= EV_READ;
if (pop->event_set[i].revents & POLLOUT)
res |= EV_WRITE;
if (res == 0)
continue;