jpdillingham / Soulseek.NET

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

Add a semaphore to connection writes, preventing concurrent writes from interleaving #801

Closed jpdillingham closed 7 months ago

jpdillingham commented 7 months ago

Also moves allocation of the write buffer to within the try/catch, ensuring the semaphores are released if the allocation throws.

Thanks @mathiascode for reporting this bug!

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
66.7% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov[bot] commented 7 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (dbad108) 99.42% compared to head (6826a98) 99.38%.

Files Patch % Lines
src/Network/Tcp/Connection.cs 85.71% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #801 +/- ## ========================================== - Coverage 99.42% 99.38% -0.04% ========================================== Files 182 182 Lines 6225 6229 +4 Branches 938 938 ========================================== + Hits 6189 6191 +2 - Misses 20 21 +1 - Partials 16 17 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mathiascode commented 7 months ago

@jackBonadies In case it's relevant for Seeker.