Fix infinite loop in the legacy poller
This commit is contained in:
parent
9fab2fd2bd
commit
2c150b5399
4
common.c
4
common.c
|
@ -1331,11 +1331,9 @@ 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;
|
||||
if (pfd.revents)
|
||||
info->dispatcher (&pfd, info->user_data);
|
||||
i = self->dispatch_next;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue