aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs')
-rw-r--r--src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs
index 7990a7d15f..2f40e1a8ef 100644
--- a/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs
+++ b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs
@@ -59,10 +59,9 @@ namespace Grpc.Core.Tests
server.Start();
AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) =>
{
- // TODO: expose API for killing all servers
- // TODO: expose API for closing all channels
- server.KillAsync();
- GrpcEnvironment.ReleaseAsync();
+ var shutdownChannelsTask = GrpcEnvironment.ShutdownChannelsAsync();
+ var killServersTask = GrpcEnvironment.KillServersAsync();
+ Task.WaitAll(shutdownChannelsTask, killServersTask);
};
}