From d9c70767aa6da8b62b4a1034d5f07892603beddd Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 29 Nov 2012 14:32:12 +0100 Subject: [PATCH] Fix check for expired events. This would trigger a infinite loop if a timeout expired and the next timeout was not expired yet, but less than 1 second from being expired. --- src/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event.c b/src/event.c index 71213bcc..fdbf11d1 100644 --- a/src/event.c +++ b/src/event.c @@ -182,7 +182,7 @@ bool event_loop(void) { timeout_t *timeout = timeout_tree.head->data; timersub(&timeout->tv, &now, &diff); - if(diff.tv_sec <= 0) { + if(diff.tv_sec < 0) { timeout->cb(timeout->data); if(timercmp(&timeout->tv, &now, <)) timeout_del(timeout); -- 2.39.5