From 52760dd0e5d478d49d6614597749bbec01a7a057 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 29 May 2015 23:09:26 -0700 Subject: [PATCH] Trigger server shutdown check where it needs to be --- src/core/surface/server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/surface/server.c b/src/core/surface/server.c index a72dd8ece48..6118e436209 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -196,6 +196,7 @@ static void begin_call(grpc_server *server, call_data *calld, static void fail_call(grpc_server *server, requested_call *rc); static void shutdown_channel(channel_data *chand, int send_goaway, int send_disconnect); +static void maybe_finish_shutdown(grpc_server *server); static int call_list_join(call_data **root, call_data *call, call_list list) { GPR_ASSERT(!call->root[list]); @@ -315,6 +316,7 @@ static void destroy_channel(channel_data *chand) { GPR_ASSERT(chand->server != NULL); orphan_channel(chand); server_ref(chand->server); + maybe_finish_shutdown(chand->server); grpc_iomgr_add_callback(finish_destroy_channel, chand); }