diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2014-08-18 23:07:55 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2014-08-18 23:07:55 +0200 |
commit | 2c150b53992212d1a90c623d8b7faa5907e31ea8 (patch) | |
tree | 3bde550fa30da96d2432ee89ae01bfeb04932e1c | |
parent | 9fab2fd2bdf8c17b8cda9479cabd48a2618adeb7 (diff) | |
download | xK-2c150b53992212d1a90c623d8b7faa5907e31ea8.tar.gz xK-2c150b53992212d1a90c623d8b7faa5907e31ea8.tar.xz xK-2c150b53992212d1a90c623d8b7faa5907e31ea8.zip |
Fix infinite loop in the legacy poller
-rw-r--r-- | common.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; } |