Browse Source

Kill pending in core server all cancel

Vijay Pai 4 years ago
parent
commit
aab77dafee
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/core/lib/surface/server.cc

+ 3 - 0
src/core/lib/surface/server.cc

@@ -840,6 +840,9 @@ void Server::CancelAllCalls() {
   {
   {
     MutexLock lock(&mu_global_);
     MutexLock lock(&mu_global_);
     broadcaster.FillChannelsLocked(GetChannelsLocked());
     broadcaster.FillChannelsLocked(GetChannelsLocked());
+    MutexLock call_lock(&mu_call_);
+    KillPendingWorkLocked(
+        GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown"));
   }
   }
   broadcaster.BroadcastShutdown(
   broadcaster.BroadcastShutdown(
       /*send_goaway=*/false,
       /*send_goaway=*/false,