-
Notifications
You must be signed in to change notification settings - Fork 659
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
do not panic on connection reset #206
Conversation
Tested on rp3 with Raspbian. Now it handles better when connection is unstable, but sometimes it crashes anyways. |
I’d like to implement a reconnect using the credentials of the session which connection was reset. I’m seeing a lot of resets. But with this patch at least Librespot does not panic and keeps running |
If it crashes, do you have a stacktrace to see if that crash is related to this patch? |
@lrbalt thanks for taking a stab at this long running bug :) I'll not merge it for now to give @elganzua124 a chance to provide a stack trace to see if it has anything to do with this PR and/or if there is anything that can be added if necessary. With regards to reconnecting with existing credentials, I think you could potentially use the auth blob that's stored/returned to reauthenticate? |
I can not reproduce the issue right now. I'll do some more tests tomorrow. For now it resolves Internet interruptions just fine:
Regarding to credentials, it would be great if librespot could reconnect using them, then one could choose in configurations if librespot should resume when session is restored (default) or just wait for user directives. With that I would be more than satisfied. |
Sorry, I missed you cargo fmt question. I’ll do that tomorrow. |
@sashahilton00 rustfmt added to PR
cargo fmt does complain about configuration options:
|
@lrbalt thanks, will let Travis run and merge. |
Merged, thanks for implementing this. Have left #134 open for when the reconnection logic is implemented in the library. |
If Spotify cannot communicate with your Librespot device, the connection is reset. This patch handles this case by stopping the Session, Spirc and Player. Librespot then keeps listening for new connections
This should fix #196 and #134