From 21e75ebd552a582bbc4c9a58bc00fd2d321bb637 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Fri, 19 Sep 2014 01:06:42 +0200 Subject: Fix removal from dispatch in timer callbacks --- common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.c b/common.c index d10a115..f06fc96 100644 --- a/common.c +++ b/common.c @@ -1187,11 +1187,11 @@ poller_run (struct poller *self) if (n_fds == -1) exit_fatal ("%s: %s", "epoll", strerror (errno)); - poller_timers_dispatch (&self->timers); - self->dispatch_next = 0; self->dispatch_total = n_fds; + poller_timers_dispatch (&self->timers); + while (self->dispatch_next < self->dispatch_total) { struct epoll_event *revents = self->revents + self->dispatch_next; -- cgit v1.2.3-70-g09d2