From 2c150b53992212d1a90c623d8b7faa5907e31ea8 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Mon, 18 Aug 2014 23:07:55 +0200
Subject: Fix infinite loop in the legacy poller
---
common.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/common.c b/common.c
index 26be47f..9d26799 100644
--- a/common.c
+++ b/common.c
@@ -1331,12 +1331,10 @@ poller_run (struct poller *self)
for (int i = 0; i < (int) self->len; )
{
struct pollfd pfd = self->fds[i];
- if (!pfd.revents)
- continue;
-
struct poller_info *info = self->fds_info + i;
self->dispatch_next = ++i;
- info->dispatcher (&pfd, info->user_data);
+ if (pfd.revents)
+ info->dispatcher (&pfd, info->user_data);
i = self->dispatch_next;
}
--
cgit v1.2.3-70-g09d2