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

Clear reserved buffer on reader disposal #461

Merged
merged 1 commit into from
May 2, 2020

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented May 2, 2020

This prevents an exception being thrown (or worse: data corruption) as a connection is being torn down when the buffer is released by DisposeReader() followed by a later call to IJsonRpcMessageBufferManager.DeserializationComplete in the same class.

This prevents an exception being thrown (or worse: data corruption) as a connection is being torn down when the buffer is released by DisposeReader() followed by a later call to IJsonRpcMessageBufferManager.DeserializationComplete in the same class.
@AArnott AArnott added this to the v2.5 milestone May 2, 2020
@AArnott AArnott self-assigned this May 2, 2020
@codecov-io
Copy link

codecov-io commented May 2, 2020

Codecov Report

Merging #461 into master will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #461      +/-   ##
==========================================
+ Coverage   90.51%   90.59%   +0.08%     
==========================================
  Files          50       50              
  Lines        3775     3797      +22     
==========================================
+ Hits         3417     3440      +23     
+ Misses        358      357       -1     
Impacted Files Coverage Δ
src/StreamJsonRpc/PipeMessageHandler.cs 90.90% <100.00%> (+0.11%) ⬆️
src/StreamJsonRpc/JsonRpcExtensions.cs 100.00% <0.00%> (ø)
src/StreamJsonRpc/JsonRpcTargetOptions.cs 100.00% <0.00%> (ø)
src/StreamJsonRpc/JsonRpcEnumerableSettings.cs 100.00% <0.00%> (ø)
src/StreamJsonRpc/JsonRpc.cs 92.95% <0.00%> (+0.05%) ⬆️
...nRpc/Reflection/MessageFormatterProgressTracker.cs 94.66% <0.00%> (+0.38%) ⬆️
src/StreamJsonRpc/MessageHandlerBase.cs 100.00% <0.00%> (+1.26%) ⬆️

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 94c2cc6...ccf7a85. Read the comment docs.

@AArnott AArnott merged commit bc315bf into microsoft:master May 2, 2020
@AArnott AArnott deleted the avoidStackingErrors branch May 2, 2020 21:49
@AArnott AArnott added the bug label May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants