aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-07-06 14:09:23 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-07-06 14:09:23 -0700
commit43f5ac6a28f02e9d154b36668717891252e87d64 (patch)
tree94d68d12133c7aecea49ea149f3fc673f3311155 /src
parent1dd7026cd28f5a64ea8fca766feb16a9cdfcded5 (diff)
Guard against double pollset shutdown completion
Diffstat (limited to 'src')
-rw-r--r--src/core/iomgr/pollset_posix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c
index 15ed8e75e6..12496440de 100644
--- a/src/core/iomgr/pollset_posix.c
+++ b/src/core/iomgr/pollset_posix.c
@@ -249,7 +249,8 @@ static void basic_do_promote(void *args, int success) {
pollset->in_flight_cbs--;
if (pollset->shutting_down) {
/* We don't care about this pollset anymore. */
- if (pollset->in_flight_cbs == 0 && pollset->counter == 0) {
+ if (pollset->in_flight_cbs == 0 && pollset->counter == 0 && !pollset->called_shutdown) {
+ pollset->called_shutdown = 1;
do_shutdown_cb = 1;
}
} else if (grpc_fd_is_orphaned(fd)) {