Skip to content

Commit

Permalink
Fix a spurious-call bug on epoll.c
Browse files Browse the repository at this point in the history
We were trying to check whether any events had really been
notified on an fd before calling evmap_io_active on it, but instead
we were checking for an event pointer, which was always true.

In practice, this patch shouldn't change much, since epoll_wait
shouldn't return an event unless there is actually an event going
on.

Spotted by an anonymous bug reporter on Sourceforge.  Closes bug
3078425.
  • Loading branch information
nmathewson committed Oct 1, 2010
1 parent a8b7674 commit 0faaee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ epoll_dispatch(struct event_base *base, struct timeval *tv)
ev |= EV_WRITE;
}

if (!events)
if (!ev)
continue;

evmap_io_active(base, events[i].data.fd, ev | EV_ET);
Expand Down

0 comments on commit 0faaee0

Please sign in to comment.