-
Notifications
You must be signed in to change notification settings - Fork 592
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
core: retry session connection #1345
core: retry session connection #1345
Conversation
3cbef8f
to
59a254b
Compare
@michaelherger I re-implemented this after realising it was retrying even when the auth failed due to a bad login, and it was also looping around the access points forever. |
Tries multiple access-points with a retry for each one, unless was a login failure.
59a254b
to
118a2f3
Compare
I'm away for the weekend... with limited internet access. I'll look into this ASAP. Thanks a ton! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My Rust is very limited... I probably learned more from that PR than I knew before 🤦🏻.
But given my limited understanding I believe the change makes sense. See inline comments for some validation of my assumptions. Thanks!
...and testing the code I'm already seeing a first "Connection refused" event fixed by this patch. 👍🏻 |
So, good to merge? Depending on the discussion with login5, this could be a good last one to get in before v0.5. I feel like Spotify's infra error was good fortune, so people switched to dev and gave it a good shakedown. |
If @kingosticks can confirm my assumptions, then I'd be happy to have this merged! It clearly improves behaviour for my use case.
I feel caught out 😁. |
FWIW: I've now played about 70 tracks without hiccup, for which librespot needed to re-try three times. Great job! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarifications!
IMHO good to merge.
When session connection fails, retry the access point. If still fails for a non-auth-login reason, repeat for the other access points. Also some logging tweaks.
When blocking ap-gew1.spotify.com, now I see each a retry for each AP on that host, until it finds an AP on a different host and succeeds.
When using bad credentials, it does not retry: