++x_actives;
}
- if (ev->ev_events & (EV_READ|EV_WRITE))
+ if (ev->ev_events & (EV_READ | EV_WRITE))
{
if (ev_is_active (&ev->io))
{
--x_actives;
}
- ev_io_set (&ev->io, ev->ev_fd, ev->ev_events);
+ ev_io_set (&ev->io, ev->ev_fd, ev->ev_events & (EV_READ | EV_WRITE));
ev_io_start (&ev->io);
++x_actives;
}
once->cb = cb;
once->arg = arg;
- ev_once (fd, events & (EV_READ|EV_WRITE), tv_get (tv), x_once_cb, (void *)once);
+ ev_once (fd, events & (EV_READ | EV_WRITE), tv_get (tv), x_once_cb, (void *)once);
return 0;
}