aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-06-08 19:45:54 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-06-08 19:45:54 -0700
commit8e93533f65938a83760f522c9825cd903a307f03 (patch)
tree6e73568db7bf1320c4db51daf7a2f25172ff4c2b /src/csharp/Grpc.Core
parent95e547ef9ec96d7693c86d007555b5ce68be3510 (diff)
allow shutdown of unstarted server
Diffstat (limited to 'src/csharp/Grpc.Core')
-rw-r--r--src/csharp/Grpc.Core/Server.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs
index ae7a8c9a9a..3b554e5e87 100644
--- a/src/csharp/Grpc.Core/Server.cs
+++ b/src/csharp/Grpc.Core/Server.cs
@@ -140,6 +140,7 @@ namespace Grpc.Core
lock (myLock)
{
GrpcPreconditions.CheckState(!startRequested);
+ GrpcPreconditions.CheckState(!shutdownRequested);
startRequested = true;
handle.Start();
@@ -203,7 +204,6 @@ namespace Grpc.Core
{
lock (myLock)
{
- GrpcPreconditions.CheckState(startRequested);
GrpcPreconditions.CheckState(!shutdownRequested);
shutdownRequested = true;
}
@@ -215,7 +215,6 @@ namespace Grpc.Core
{
handle.CancelAllCalls();
}
-
await ShutdownCompleteOrEnvironmentDeadAsync().ConfigureAwait(false);
DisposeHandle();