]> granicus.if.org Git - libevent/commitdiff
fix poll hup support
authorNiels Provos <provos@gmail.com>
Thu, 25 Sep 2003 23:07:09 +0000 (23:07 +0000)
committerNiels Provos <provos@gmail.com>
Thu, 25 Sep 2003 23:07:09 +0000 (23:07 +0000)
svn:r82

poll.c

diff --git a/poll.c b/poll.c
index 385023c9f44ea36947b02bf11ab950db59c29ebe..d41755ddcb360de16cb941158f2c8ce1463dc08c 100644 (file)
--- 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;