aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-28 07:39:31 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-28 07:39:31 -0700
commitbaac94033183af25ca08b6f71e995d19a48a1111 (patch)
tree2e337d840f5758b571562a443a0fb70e99d113df
parentd1369aa134e8eaab1bde6a5ea36a8ba655c79a57 (diff)
Add comment
-rw-r--r--src/core/iomgr/pollset_posix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c
index a38517908d..826c792990 100644
--- a/src/core/iomgr/pollset_posix.c
+++ b/src/core/iomgr/pollset_posix.c
@@ -420,6 +420,8 @@ static int unary_poll_pollset_maybe_work(grpc_pollset *pollset,
pfd[1].events = grpc_fd_begin_poll(fd, pollset, POLLIN, POLLOUT, &fd_watcher);
+ /* poll fd count (argument 2) is shortened by one if we have no events
+ to poll on - such that it only includes the kicker */
r = poll(pfd, GPR_ARRAY_SIZE(pfd) - (pfd[1].events == 0), timeout);
GRPC_TIMER_MARK(GRPC_PTAG_POLL_FINISHED, r);