aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-06-15 12:35:25 -0700
committerGravatar GitHub <noreply@github.com>2016-06-15 12:35:25 -0700
commitdd692b34c73fb2db8bc9e8de4b117e753a3d69f7 (patch)
tree53bd3a39db06fdb9d1c5fd65c5add421cfbcb52b /src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
parentefcaa4bc10f43e797bd60bbd2145cc83e291b5af (diff)
parentb8d50af3a58f99a4c0d379d9a68f7bc4dd383f7e (diff)
Merge pull request #6908 from jtattermusch/csharp_send_completion_dedup
C#: dedup code for send finished handler
Diffstat (limited to 'src/csharp/Grpc.Core/Internal/AsyncCallBase.cs')
-rw-r--r--src/csharp/Grpc.Core/Internal/AsyncCallBase.cs27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
index cb8366c216..eb9c3ea62d 100644
--- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
+++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
@@ -248,7 +248,7 @@ namespace Grpc.Core.Internal
}
/// <summary>
- /// Handles send completion.
+ /// Handles send completion (including SendCloseFromClient).
/// </summary>
protected void HandleSendFinished(bool success)
{
@@ -272,31 +272,6 @@ namespace Grpc.Core.Internal
}
/// <summary>
- /// Handles halfclose (send close from client) completion.
- /// </summary>
- protected void HandleSendCloseFromClientFinished(bool success)
- {
- TaskCompletionSource<object> origTcs = null;
- lock (myLock)
- {
- origTcs = streamingWriteTcs;
- streamingWriteTcs = null;
-
- ReleaseResourcesIfPossible();
- }
-
- if (!success)
- {
- // TODO(jtattermusch): this method is same as HandleSendFinished (only the error message differs).
- origTcs.SetException(new InvalidOperationException("Sending close from client has failed."));
- }
- else
- {
- origTcs.SetResult(null);
- }
- }
-
- /// <summary>
/// Handles send status from server completion.
/// </summary>
protected void HandleSendStatusFromServerFinished(bool success)