From f08bf5325eb9bb2afa3b68f629a69de59920406b Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Thu, 25 Sep 2003 23:07:09 +0000 Subject: [PATCH] fix poll hup support svn:r82 --- poll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poll.c b/poll.c index 385023c9..d41755dd 100644 --- a/poll.c +++ b/poll.c @@ -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;