-
Notifications
You must be signed in to change notification settings - Fork 1
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
server attempts to connect to mopidy over telnet before mopidy is running #13
Comments
The server attempts to connect to the telnet port every few seconds until it succeeds. There was no logging for the success state, which I've added at 7c203bd. Hopefully this change should help shed some light on the situation. |
Updated to 6d0946d, and server still does not connect to mopidy; I added a logging into the timeout call back and in the log I see:
So, the initial connection fails and the first reconnect timeout triggers still before the MPD server is up, and no further errors or attempts are made. I think on failure the socket object becomes invalid -- I did a quick test changing the timeout handler to recreate the socket, and this makes the connection and (the playback) work:
|
I've had a quick look at the source code and it looks like reconnecting an old socket should be as good as creating a new one. I've added a fix @8365803 to actively close all activity on the socket before attempting to reconnect. |
This does not work. I have even tried to call addHandlers() after the socket.destroy() and that also does not work. The only thing that seems to work is to recreate the socket. |
When the server starts, I see in the logs that it fails to connect to the mopidy telnet ports because it tries to do so before mopidy is up and running:
I think this might be the root cause of radiodan-archive/meta-radiodan#3
The text was updated successfully, but these errors were encountered: