-
Notifications
You must be signed in to change notification settings - Fork 627
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
Librespot device does not disappear when exiting #676
Comments
Maybe the official clients keep a particular port alive to a Spotify server, that librespot doesn't? |
I believe you understood it the other way round. But the librespot device does not disappear although it should. |
No I do mean what I said. Perhaps there’s no messaging mechanism but just an established keep-alive connection by which the official clients signal they are available. And on shutdown when they close the connection, that’s their offline signal. Just theorizing here. |
Ah ok. Would seem odd to use an extra connection to signal shutdown, but maybe it's related to the new api. @devgianlu Does the same issue exist for librespot-java? |
The new API doesn't seem to have a command to signal shutdown. All it has is these, but I am not having any issue with it not disappearing. I suppose they are detecting the websocket connection closing. |
Here's a quick and abbreviated comparison of Official Spotify client on macOS, controlling librespot on another host:
And on the librespot host it is controlling:
Where |
I've noticed two things while controlling with my Android client and stopping the librespot process:
I think it's just the second issue you are discussing here, correct? Doesn't this sound like an mDNS problem? I've found my build using So potentially off topic... but for the first issue I described I found the following hack works better, but I don't understand why!
|
Just to add, I did the Wireshark trace and I see when stopping librespot with dns-sd there is a goodbye message sent but not when using libmdns. libmdns seems to create a goodbye message but it doesn't make it out onto the wire. This looks pretty suspicious! |
I'm tagging this with |
No, it's a bug in libmdns as per the proposed fix in librespot-org/libmdns#28. I don't believe this has anything to do with how librespot works, new-api or otherwise. |
Ah I see, I was thrown off by @devgianlu earlier #676 (comment) |
The official Spotify clients disappear immediately from the list of available devices in other Spotify clients when they are exitted. Librespot does not disappear.
First I thought it has something to do with the
kMessageTypeGoodbye
that is sent on shutdown. It doesn't seem to reach another Librespot instance (with log level debug so I can see the incoming messages). But only the web player's goodbye shows up. When I close the desktop client, no goodbye message is shown in Librespot, but it disappears from the web player's device list nevertheless.I don't really understand what's going on, so maybe someone else can take a look.
This applies to the
dev
branch as well as totokio_migration
.The text was updated successfully, but these errors were encountered: