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

Trace message transmission failures #476

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Jun 9, 2020

We didn't trace these before, and while NotifyAsync and other methods will propagate the exception to the caller, if the NotifyAsync call was made by a dynamically generated proxy in response to raising an event, the exception would be swallowed without a trace.

This also fixes invocation of the virtual JsonRpc.OnRequestTransmissionAborted method so that we only invoke it on actual transmission failures and not on all errors in receiving a response too.

We didn't trace these before, and while `NotifyAsync` and other methods will propagate the exception to the caller, if the NotifyAsync call was made by a dynamically generated proxy in response to raising an event, the exception would be swallowed without a trace.

This also fixes invocation of the virtual `JsonRpc.OnRequestTransmissionAborted` method so that we only invoke it on actual transmission failures and not on all errors in receiving a response too.
@AArnott AArnott added this to the v2.5 milestone Jun 9, 2020
@AArnott AArnott self-assigned this Jun 9, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2020

Codecov Report

Merging #476 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #476      +/-   ##
==========================================
- Coverage   90.67%   90.64%   -0.03%     
==========================================
  Files          50       50              
  Lines        3838     3838              
==========================================
- Hits         3480     3479       -1     
- Misses        358      359       +1     
Impacted Files Coverage Δ
src/StreamJsonRpc/JsonRpc.cs 93.07% <100.00%> (ø)
...pc/Reflection/MessageFormatterDuplexPipeTracker.cs 92.94% <0.00%> (-1.18%) ⬇️

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 e5fad2a...6f50746. Read the comment docs.

@AArnott AArnott merged commit 18d079d into microsoft:master Jun 22, 2020
@AArnott AArnott deleted the traceTransmissionFailures branch June 22, 2020 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants