diff options
author | 2016-10-19 17:03:26 -0700 | |
---|---|---|
committer | 2016-10-19 17:03:26 -0700 | |
commit | 491e1a63064acfb53d61dce4de1beb4a57b3b0c3 (patch) | |
tree | 1c0ee9c2bf67fb2b0a9157f29c37854c195dd925 /src/core/lib/iomgr/ev_poll_posix.c | |
parent | 920ed0c4187761b55d081e1eed7eb7fbbbe6e757 (diff) | |
parent | 70ee74c4798afe781788d40afe1923feff37d657 (diff) |
Merge branch 'master' into rpc_mgr
Diffstat (limited to 'src/core/lib/iomgr/ev_poll_posix.c')
-rw-r--r-- | src/core/lib/iomgr/ev_poll_posix.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 351b069613..27e966c18c 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -985,8 +985,15 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (errno != EINTR) { work_combine_error(&error, GRPC_OS_ERROR(errno, "poll")); } + for (i = 2; i < pfd_count; i++) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); + if (watchers[i].fd == NULL) { + fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); + } else { + // Wake up all the file descriptors, if we have an invalid one + // we can identify it on the next pollset_work() + fd_end_poll(exec_ctx, &watchers[i], 1, 1, pollset); + } } } else if (r == 0) { for (i = 2; i < pfd_count; i++) { |