aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core
diff options
context:
space:
mode:
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);