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

fix: Refactor to eliminate usage of .GetAwaiter().GetResult() in Framework builds. (#2534) #2535

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

tippmar-nr
Copy link
Member

Refactors HttpCollectorWire.Send() to remove usage of .GetAwaiter().GetResult(), which required additional refactoring in IHttpClient and IHttpContentWrapper.

With this change, there are now no usages of .GetAwaiter().GetResult() in code built for the .NET Framework target.

Resolves #2534

@tippmar-nr tippmar-nr requested a review from a team as a code owner June 10, 2024 19:05
@tippmar-nr tippmar-nr changed the title Refactor to eliminate usage of .GetAwaiter().GetResult() in Framework builds. (#2534) fix: Refactor to eliminate usage of .GetAwaiter().GetResult() in Framework builds. (#2534) Jun 10, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.50%. Comparing base (227003a) to head (26e7d24).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2535      +/-   ##
==========================================
+ Coverage   80.47%   80.50%   +0.02%     
==========================================
  Files         459      459              
  Lines       28775    28873      +98     
  Branches     3153     3167      +14     
==========================================
+ Hits        23158    23244      +86     
- Misses       4837     4843       +6     
- Partials      780      786       +6     
Flag Coverage Δ
Agent 81.49% <80.00%> (+0.02%) ⬆️
Profiler 71.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
.../Agent/Core/DataTransport/Client/HttpClientBase.cs 84.09% <ø> (ø)
...ic/Agent/Core/DataTransport/Client/HttpResponse.cs 79.41% <100.00%> (-10.59%) ⬇️
...ic/Agent/Core/DataTransport/Client/NRHttpClient.cs 78.43% <100.00%> (-14.91%) ⬇️
...nt/Core/DataTransport/Client/NRWebRequestClient.cs 89.79% <100.00%> (-10.21%) ⬇️
...elic/Agent/Core/DataTransport/HttpCollectorWire.cs 88.13% <100.00%> (ø)
...nt/Core/DataTransport/Client/HttpContentWrapper.cs 0.00% <0.00%> (ø)
...e/DataTransport/Client/WebRequestClientResponse.cs 91.17% <50.00%> (ø)

... and 2 files with indirect coverage changes

@tippmar-nr tippmar-nr merged commit cfb2c28 into main Jun 10, 2024
93 checks passed
@tippmar-nr tippmar-nr deleted the fix/async-cleanup-net462 branch June 10, 2024 20:08
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.

.GetAwaiter().GetResult() usage in Framework web apps might cause a deadlock
3 participants