If at least one pre_select method requests a minimal delay, we don't
call select() anymore as it would return immediately anyway. However,
the fds that have already been set by previous pre_select methods are
then treated as ready for IO in post_seelect which they most likely
are not. This causes unnecessary calls to readv() and friends which
returned EAGAIN.
Fix this by clearing all fd sets in case of minimal timeouts.
FD_ZERO(&s->wfds);
}
gettimeofday(now, NULL);
+ } else {
+ FD_ZERO(&s->rfds);
+ FD_ZERO(&s->wfds);
}
sched_post_select(s);
if (list_empty(&pre_select_list) && list_empty(&post_select_list))