From 1718028a36c1fb010490343daedd4077471acba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Fri, 17 Aug 2007 07:56:14 +0000 Subject: [PATCH] Fire timers after handling fd's (timers may free fd-handles) --- dispatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dispatch.c b/dispatch.c index b33a06ea..d2f7e50a 100644 --- a/dispatch.c +++ b/dispatch.c @@ -214,8 +214,6 @@ dispatcher(void) n = epoll_wait(epoll_fd, events, EPOLL_FDS_PER_ROUND, stimer_next()); time(&dispatch_clock); - stimer_dispatch(dispatch_clock); - for(i = 0; i < n; i++) { e = events[i].data.ptr; @@ -232,4 +230,6 @@ dispatcher(void) e->opaque, e->fd); } + + stimer_dispatch(dispatch_clock); }