diff options
Diffstat (limited to 'src/csharp/Grpc.Core/Server.cs')
-rw-r--r-- | src/csharp/Grpc.Core/Server.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 7c94d21561..0fadabe554 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -148,10 +148,10 @@ namespace Grpc.Core } handle.ShutdownAndNotify(HandleServerShutdown, environment); - await shutdownTcs.Task; + await shutdownTcs.Task.ConfigureAwait(false); DisposeHandle(); - await Task.Run(() => GrpcEnvironment.Release()); + await Task.Run(() => GrpcEnvironment.Release()).ConfigureAwait(false); } /// <summary> @@ -169,7 +169,7 @@ namespace Grpc.Core handle.ShutdownAndNotify(HandleServerShutdown, environment); handle.CancelAllCalls(); - await shutdownTcs.Task; + await shutdownTcs.Task.ConfigureAwait(false); DisposeHandle(); } @@ -268,7 +268,7 @@ namespace Grpc.Core { callHandler = NoSuchMethodCallHandler.Instance; } - await callHandler.HandleCall(newRpc, environment); + await callHandler.HandleCall(newRpc, environment).ConfigureAwait(false); } catch (Exception e) { @@ -288,7 +288,7 @@ namespace Grpc.Core // after server shutdown, the callback returns with null call if (!newRpc.Call.IsInvalid) { - Task.Run(async () => await HandleCallAsync(newRpc)); + Task.Run(async () => await HandleCallAsync(newRpc)).ConfigureAwait(false); } } |