Fix a bug where we can spuriously wakeup a nonexistant fd

pull/2303/head
Craig Tiller 10 years ago
parent 614e27a10a
commit d1d0c0a876
  1. 3
      src/core/iomgr/pollset_multipoller_with_poll_posix.c

@ -179,6 +179,9 @@ static void multipoll_with_poll_pollset_maybe_work(
grpc_pollset_kick_consume(&pollset->kick_state, kfd); grpc_pollset_kick_consume(&pollset->kick_state, kfd);
} }
for (i = 1; i < np; i++) { for (i = 1; i < np; i++) {
if (h->watchers[i].fd == NULL) {
continue;
}
if (h->pfds[i].revents & (POLLIN | POLLHUP | POLLERR)) { if (h->pfds[i].revents & (POLLIN | POLLHUP | POLLERR)) {
grpc_fd_become_readable(h->watchers[i].fd, allow_synchronous_callback); grpc_fd_become_readable(h->watchers[i].fd, allow_synchronous_callback);
} }

Loading…
Cancel
Save