aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core/GrpcEnvironment.cs
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-06-23 13:58:29 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2016-06-23 13:58:29 -0700
commit09b1ec8ccb7b0e5b9073fb346840bcfd00f35caf (patch)
treeb2bc46c3e3741240b98c99bc1673da0b43676c03 /src/csharp/Grpc.Core/GrpcEnvironment.cs
parentd139da8b9a9c482a83b23c926690f01b49025640 (diff)
parent0140f7c9e6c20fe78035d9635a3f5725d51ad35a (diff)
Merge remote-tracking branch 'upstream/master' into auto-build-example
Diffstat (limited to 'src/csharp/Grpc.Core/GrpcEnvironment.cs')
-rw-r--r--src/csharp/Grpc.Core/GrpcEnvironment.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs
index e9e4cb4cbb..eeed699712 100644
--- a/src/csharp/Grpc.Core/GrpcEnvironment.cs
+++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs
@@ -105,7 +105,7 @@ namespace Grpc.Core
if (instanceToShutdown != null)
{
- await instanceToShutdown.ShutdownAsync();
+ await instanceToShutdown.ShutdownAsync().ConfigureAwait(false);
}
}
@@ -352,8 +352,12 @@ namespace Grpc.Core
{
if (!hooksRegistered)
{
+ // TODO(jtattermusch): register shutdownhooks for CoreCLR as well
+#if !NETSTANDARD1_5
+
AppDomain.CurrentDomain.ProcessExit += ShutdownHookHandler;
AppDomain.CurrentDomain.DomainUnload += ShutdownHookHandler;
+#endif
}
hooksRegistered = true;
}