Skip to content

Commit

Permalink
Avoid completing reader or writer except after they are done
Browse files Browse the repository at this point in the history
This is a follow-up to microsoft#350 which was evidently incompletely fixed.

Fixes microsoft#413
  • Loading branch information
AArnott committed Feb 7, 2020
1 parent b4bed10 commit d13ee3b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions src/StreamJsonRpc/PipeMessageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,6 @@ protected sealed override ValueTask WriteCoreAsync(JsonRpcMessage content, Cance
/// </remarks>
protected abstract void Write(JsonRpcMessage content, CancellationToken cancellationToken);

/// <inheritdoc />
protected override void Dispose(bool disposing)
{
if (disposing)
{
this.Reader?.Complete();
this.Writer?.Complete();

base.Dispose(disposing);
}
}

/// <inheritdoc />
protected override void DisposeReader()
{
Expand Down
1 change: 0 additions & 1 deletion src/StreamJsonRpc/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ override StreamJsonRpc.LengthHeaderMessageHandler.ReadCoreAsync(System.Threading
override StreamJsonRpc.LengthHeaderMessageHandler.Write(StreamJsonRpc.Protocol.JsonRpcMessage content, System.Threading.CancellationToken cancellationToken) -> void
override StreamJsonRpc.PipeMessageHandler.CanRead.get -> bool
override StreamJsonRpc.PipeMessageHandler.CanWrite.get -> bool
override StreamJsonRpc.PipeMessageHandler.Dispose(bool disposing) -> void
override StreamJsonRpc.PipeMessageHandler.FlushAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask
override StreamJsonRpc.Protocol.JsonRpcError.ToString() -> string
override StreamJsonRpc.Protocol.JsonRpcRequest.ToString() -> string
Expand Down

0 comments on commit d13ee3b

Please sign in to comment.