Open aykevl opened 1 week ago
I have observed this myself too, it was working fine before, I think it's a regression introduced by https://github.com/devgianlu/go-librespot/pull/69. I did not debug this yet because I am not able to reproduce it consistenly, just happens randomly on my device.
Can you describe how this is supposed to work? Then I might be able to develop a fix (I normally have a Spotifyd/librespot instance running 24/7 so I hit this frequently).
There are two components called accesspoint (AP) and dealer that are persistent connections (TCP and Websocket). They both rely on a ping/pong (120 seconds for AP, 30 for dealer) mechanism to keep the server/client connected.
The idea behind that code is that if no ping/pong is received then the connection is closed causing the recv loop to fail and start reconnecting.
I think this is somewhat related to #48.
Sometimes the Shannon connection (whatever that is) breaks, and go-librespot becomes unusable:
Here is another error:
(this time without the "did not receive last pong from dealer" messages, though it did start to spew those messages when I tried, and failed, to connect to the go-librespot instance).
I inserted some debugging code, and the stack trace where this error is generated in both cases looks like this:
Looking at the code (
AccessPoint.recvLoop
) it looks like it is intended to reestablish the connection when an error occurs, but clearly it doesn't for me.