jpdillingham / Soulseek.NET

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

Refactor login sequence so that it no longer depends on unrelated server messages #809

Closed jpdillingham closed 8 months ago

jpdillingham commented 8 months ago

805 improved logging in this area but after thinking about it for a while I no longer think it's a good idea to even couple these things to the login; the data isn't necessary for the client to function.

This PR moves the handling of ParentMinSpeed, ParentSpeedRatio and WishlistInterval out of band.

The ServerInfoReceived event will fire each time any of the four captured properties is received; the first time at successful login, setting IsSupporter, and then once for each of the other three. The associated properties will remain null until the data is received, and if the server doesn't send it, no big deal.

The observed defaults for these properties are:

This PR also corrects a mistake in the documentation; WishlistInterval is expressed in seconds, not milliseconds. Anyone relying on this value to perform wishlist searches should make an adjustment immediately.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c38fdb0) 99.39% compared to head (e1d4c67) 99.42%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #809 +/- ## ========================================== + Coverage 99.39% 99.42% +0.03% ========================================== Files 183 183 Lines 6250 6257 +7 Branches 945 947 +2 ========================================== + Hits 6212 6221 +9 + Misses 21 20 -1 + Partials 17 16 -1 ```

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

sonarcloud[bot] commented 8 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud