aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr/pollset_multipoller_with_poll_posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/iomgr/pollset_multipoller_with_poll_posix.c')
-rw-r--r--src/core/iomgr/pollset_multipoller_with_poll_posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/iomgr/pollset_multipoller_with_poll_posix.c b/src/core/iomgr/pollset_multipoller_with_poll_posix.c
index 7570ff18c5..bcef7c35b5 100644
--- a/src/core/iomgr/pollset_multipoller_with_poll_posix.c
+++ b/src/core/iomgr/pollset_multipoller_with_poll_posix.c
@@ -172,6 +172,9 @@ static int multipoll_with_poll_pollset_maybe_work(
}
r = poll(h->pfds, h->pfd_count, timeout);
+
+ end_polling(pollset);
+
if (r < 0) {
if (errno != EINTR) {
gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno));
@@ -192,7 +195,6 @@ static int multipoll_with_poll_pollset_maybe_work(
}
}
grpc_pollset_kick_post_poll(&pollset->kick_state);
- end_polling(pollset);
gpr_mu_lock(&pollset->mu);
pollset->counter = 0;