aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-05-23 16:06:01 -0400
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-05-23 16:06:01 -0400
commit6854c70c94af37f2504018d4274e9c1d107b98ed (patch)
tree9f8b9ac63d18482bebc81c36d4034ed42529254b /src
parentd9108331756823ba8c1af051d174bb416a87fdb1 (diff)
reorder clientside send preconditions
Diffstat (limited to 'src')
-rw-r--r--src/csharp/Grpc.Core/Internal/AsyncCall.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs
index 8652b297c8..10c1295e9a 100644
--- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs
+++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs
@@ -366,6 +366,9 @@ namespace Grpc.Core.Internal
private Task CheckSendPreconditionsClientSide()
{
+ GrpcPreconditions.CheckState(!halfcloseRequested, "Request stream has already been completed.");
+ GrpcPreconditions.CheckState(streamingWriteTcs == null, "Only one write can be pending at a time.");
+
if (cancelRequested)
{
// Return a cancelled task.
@@ -374,9 +377,6 @@ namespace Grpc.Core.Internal
return tcs.Task;
}
- GrpcPreconditions.CheckState(!halfcloseRequested, "Request stream has already been completed.");
- GrpcPreconditions.CheckState(streamingWriteTcs == null, "Only one write can be pending at a time.");
-
return null;
}