Closed tagdara closed 11 months ago
Thank you!
FWIW, I cherry-picked this commit into my local copy and librespot-java now works much better & reliable. Now listening for several hours already without any interruptions. Thanks @tagdara!
Thank you! @tagdara I didn't get much into the code yet, but I think it would be more reliable to catch the CDN failure, and then reselect another CDN server while also keeping a dynamic list of the failed CDNs with some TTL that could be selected again after a few hours / days. I think it's better than having to maintain a list of bad servers in code. I know it's a temp fix, but maybe it's a good aproach for the long-run.
This is related to the issues in Ssl err #742
Spotify has included a server (audio4-gm-fb) in their CDN rotation which has several issues:
This patch watches for the server to be selected, and when it happens, forces a re-selection. This retains the random logic for CDN selection.
Hopefully Spotify will fix this on the back-end and these patches will no longer be needed