Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v2.2 into master #94

Merged
merged 11 commits into from Jul 7, 2019
Merged

Merge v2.2 into master #94

merged 11 commits into from Jul 7, 2019

Conversation

AArnott
Copy link
Collaborator

@AArnott AArnott commented Jul 7, 2019

No description provided.

Use global.json specified SDK
When Channel.ProcessOutboundTransmissionsAsync has not yet processed the written and flushed buffer by the time Channel.Dispose is called, the channel can end up terminating before the content is transmitted.

Repros #88 (occasionally, or with debugger help in timing)
Similar fix to what we had to [fix in streamjsonrpc][1] a while ago.

[1]: microsoft/vs-streamjsonrpc#176
Frames received for a channel after its local disposal are now discarded. Any pending write+flush to the channel's PipeWriter is canceled so as to avoid plugging up the multiplexing stream when the disposed channel hasn't drained its own pipe.
When a Channel is disposed after writing and flushing bytes, a Channel that manages its own Pipe will complete transmission before actual disposal. Channels initialized with an ExistingPipe will terminate without guaranteeing that writes are completed, since we don't have any way of knowing when writes are done if the writer is not completed (which is our recommended path for disposing channels).

Fixes #88
Fix Channel.Dispose to handle pending sends/receives
@AArnott AArnott added this to the v2.3 milestone Jul 7, 2019
@AArnott AArnott self-assigned this Jul 7, 2019
@codecov
Copy link

codecov bot commented Jul 7, 2019

Codecov Report

Merging #94 into master will increase coverage by 0.06%.
The diff coverage is 94.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
+ Coverage      90%   90.06%   +0.06%     
==========================================
  Files          31       31              
  Lines        2101     2175      +74     
  Branches      372      397      +25     
==========================================
+ Hits         1891     1959      +68     
- Misses        174      179       +5     
- Partials       36       37       +1
Impacted Files Coverage Δ
...Nerdbank.Streams/MultiplexingStream.FrameHeader.cs 94.11% <0%> (-5.89%) ⬇️
src/Nerdbank.Streams/MultiplexingStream.Channel.cs 94.53% <100%> (+0.86%) ⬆️
src/Nerdbank.Streams/MultiplexingStream.cs 91.7% <90.56%> (-0.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3796430...46f0a96. Read the comment docs.

@AArnott AArnott merged commit 3182632 into master Jul 7, 2019
AArnott pushed a commit that referenced this pull request Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant