Now we can have multiple events listen on a single fd. The order in which they
are called is naturally not defined, meaning that it is only deterministic if
exactly one event is readable or writeable.
if (FD_ISSET(fde->fd, read_fds)) flags |= EVENT_FD_READ;
if (FD_ISSET(fde->fd, write_fds)) flags |= EVENT_FD_WRITE;
- if (flags) {
+ if (flags & fde->flags) {
fde->handler(event_ctx, fde, flags, fde->private_data);
fired = True;
}