jpdillingham / Soulseek.NET

A .NET Standard client library for the Soulseek network.
GNU General Public License v3.0
177 stars 23 forks source link

Dispose raw response streams after writing #755

Closed jpdillingham closed 2 years ago

jpdillingham commented 2 years ago

When sending a raw response, the response is returned from a delegate and then sent by the library, making it impossible for the caller to dispose the stream at the correct time.

This PR adds logic to dispose the stream included in raw search and browse responses after the response has been sent over the network.

sonarcloud[bot] commented 2 years ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 18 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

codecov[bot] commented 2 years ago

Codecov Report

Merging #755 (2bf09d5) into master (a7bb05a) will decrease coverage by 0.19%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #755      +/-   ##
==========================================
- Coverage   99.22%   99.02%   -0.20%     
==========================================
  Files         178      178              
  Lines        6171     6183      +12     
  Branches      930      933       +3     
==========================================
  Hits         6123     6123              
- Misses         32       44      +12     
  Partials       16       16              
Impacted Files Coverage Δ
src/BrowseResponse.cs 52.38% <ø> (ø)
src/Messaging/Handlers/PeerMessageHandler.cs 92.57% <0.00%> (-4.44%) :arrow_down:
src/SearchResponder.cs 91.46% <0.00%> (-4.70%) :arrow_down:
src/SearchResponse.cs 78.72% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more