aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-05-29 12:29:43 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-05-29 12:29:43 -0700
commit29f741fee997790c9c0fd78047e46a052a5bc9c0 (patch)
treeabc1cc969a56139b4648fe07a357a504b57a6b86 /src
parent9ba2c87fd7bf98e498f170041992576530de3242 (diff)
Produce nicer warnings
Diffstat (limited to 'src')
-rw-r--r--src/core/iomgr/iomgr.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/iomgr/iomgr.c b/src/core/iomgr/iomgr.c
index d22542fc91..7e6315a8cc 100644
--- a/src/core/iomgr/iomgr.c
+++ b/src/core/iomgr/iomgr.c
@@ -110,9 +110,14 @@ void grpc_iomgr_shutdown(void) {
gpr_mu_lock(&g_mu);
g_shutdown = 1;
- while (g_cbs_head || g_refs) {
- gpr_log(GPR_DEBUG, "Waiting for %d iomgr objects to be destroyed%s", g_refs,
- g_cbs_head ? " and executing final callbacks" : "");
+ while (g_cbs_head != NULL || g_refs > 0) {
+ if (g_cbs_head != NULL && g_refs > 0) {
+ gpr_log(GPR_DEBUG, "Waiting for %d iomgr objects to be destroyed and executing final callbacks", g_refs);
+ } else if (g_cbs_head != NULL) {
+ gpr_log(GPR_DEBUG, "Executing final iomgr callbacks");
+ } else {
+ gpr_log(GPR_DEBUG, "Waiting for %d iomgr objects to be destroyed", g_refs);
+ }
while (g_cbs_head) {
cb = g_cbs_head;
g_cbs_head = cb->next;