diff options
-rw-r--r-- | utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1223,12 +1223,12 @@ poller_run (struct poller *self) self->dispatch_next = 0; self->dispatch_total = n_fds; - poller_timers_dispatch (&self->timers); - poller_idle_dispatch (self->idle); - // Sort them by file descriptor number for binary search qsort (self->revents, n_fds, sizeof *self->revents, poller_compare_fds); + poller_timers_dispatch (&self->timers); + poller_idle_dispatch (self->idle); + while (self->dispatch_next < self->dispatch_total) { struct epoll_event *revents = self->revents + self->dispatch_next; |