Parcourir la source

Kill pending in core server all cancel

Vijay Pai il y a 4 ans
Parent
commit
aab77dafee
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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_);
     broadcaster.FillChannelsLocked(GetChannelsLocked());
+    MutexLock call_lock(&mu_call_);
+    KillPendingWorkLocked(
+        GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown"));
   }
   broadcaster.BroadcastShutdown(
       /*send_goaway=*/false,