]> granicus.if.org Git - libevent/commitdiff
fix a bug for persistent events when using select()
authorNiels Provos <provos@gmail.com>
Tue, 13 Jul 2004 07:55:01 +0000 (07:55 +0000)
committerNiels Provos <provos@gmail.com>
Tue, 13 Jul 2004 07:55:01 +0000 (07:55 +0000)
svn:r108

select.c

index 0a47a6a86345dc17a88ddd6e27ed64b17cf005ee..2a1c6f330984838b9ddebb104d0ded2170d3ef22 100644 (file)
--- a/select.c
+++ b/select.c
@@ -201,6 +201,8 @@ select_dispatch(void *arg, struct timeval *tv)
                if (res) {
                        if (!(ev->ev_events & EV_PERSIST))
                                event_del(ev);
+                       else if (ev->ev_fd > maxfd)
+                               maxfd = ev->ev_fd;
                        event_active(ev, res, 1);
                } else if (ev->ev_fd > maxfd)
                        maxfd = ev->ev_fd;