aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-05-23 12:41:57 -0400
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-05-23 12:41:57 -0400
commit8472cc5bc5428b5006b9ca608d399159d7daeee1 (patch)
tree24ea40fc5a8d4f166dd577a7471e39ba11ed38f8 /src/csharp/Grpc.Core
parent84dcf0661ebe8436f52d3693ac9443ab1d7ac99b (diff)
preparation for write semantics cleanup
Diffstat (limited to 'src/csharp/Grpc.Core')
-rw-r--r--src/csharp/Grpc.Core/Internal/AsyncCall.cs1
-rw-r--r--src/csharp/Grpc.Core/Internal/AsyncCallBase.cs2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs
index b50580c40f..ab194121a7 100644
--- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs
+++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs
@@ -251,6 +251,7 @@ namespace Grpc.Core.Internal
{
lock (myLock)
{
+ GrpcPreconditions.CheckState(started);
CheckSendingAllowed(allowFinished: true);
if (!disposed && !finished)
diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
index 180b89db4d..df313cbb73 100644
--- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
+++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
@@ -135,6 +135,7 @@ namespace Grpc.Core.Internal
lock (myLock)
{
+ GrpcPreconditions.CheckState(started);
CheckSendingAllowed(allowFinished: false);
call.StartSendMessage(HandleSendFinished, payload, writeFlags, !initialMetadataSent);
@@ -213,7 +214,6 @@ namespace Grpc.Core.Internal
protected virtual void CheckSendingAllowed(bool allowFinished)
{
- GrpcPreconditions.CheckState(started);
CheckNotCancelled();
GrpcPreconditions.CheckState(!disposed || allowFinished);