if(m->handler.pfds[i].revents == 0)
continue;
+ ready++;
/* remove fd from list on POLLNVAL */
if (m->handler.pfds[i].revents & POLLNVAL)
{
/* POLLIN / POLLOUT process event */
if (m->handler.pfds[i].revents & POLLIN)
- ready += thread_process_fds_helper(m, m->read[m->handler.pfds[i].fd], NULL, POLLIN, i);
+ thread_process_fds_helper(m, m->read[m->handler.pfds[i].fd], NULL, POLLIN, i);
if (m->handler.pfds[i].revents & POLLOUT)
- ready += thread_process_fds_helper(m, m->write[m->handler.pfds[i].fd], NULL, POLLOUT, i);
+ thread_process_fds_helper(m, m->write[m->handler.pfds[i].fd], NULL, POLLOUT, i);
/* remove fd from list on POLLHUP after other event is processed */
if (m->handler.pfds[i].revents & POLLHUP)
(m->handler.pfdsize-i-1) * sizeof(struct pollfd));
m->handler.pfdcount--;
i--;
- ready++;
}
else
m->handler.pfds[i].revents = 0;