diff options
author | Craig Tiller <ctiller@google.com> | 2015-07-01 12:33:22 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-07-01 12:33:22 -0700 |
commit | d2d596a21da7f219818f7386b52b91a0dca021dd (patch) | |
tree | 1f9feac94e60f95a51a3abdb5ebd1a93adcbb0b9 /src | |
parent | f8c63562c1388262c5588e381c05cb0c02e5b406 (diff) |
Fix a bug in the multipoll on poll path where we use a file descriptor thats orphaned by mistake
Diffstat (limited to 'src')
-rw-r--r-- | src/core/iomgr/pollset_multipoller_with_poll_posix.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/iomgr/pollset_multipoller_with_poll_posix.c b/src/core/iomgr/pollset_multipoller_with_poll_posix.c index cc062693a9..7b717bd159 100644 --- a/src/core/iomgr/pollset_multipoller_with_poll_posix.c +++ b/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); } for (i = 1; i < np; i++) { + if (h->watchers[i].fd == NULL) { + continue; + } if (h->pfds[i].revents & (POLLIN | POLLHUP | POLLERR)) { grpc_fd_become_readable(h->watchers[i].fd, allow_synchronous_callback); } |