From baac94033183af25ca08b6f71e995d19a48a1111 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 May 2015 07:39:31 -0700 Subject: [PATCH] Add comment --- src/core/iomgr/pollset_posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index a38517908da..826c792990e 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);