Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid playing queue pollution with Sonos unjoin #22004
This is the same fix as in #21963, but for explicit
Imagine three speakers in a group, ABC, playing the A queue. If we unjoin A, the remaining group BC will elect a new coordinator that must drop its own queue in order to not interrupt the playing A queue. If we then unjoin B, we have three separate speakers but at least one of them will have had its queue replaced.
In contrast, unjoining in the order B then C will make them each restore their own queues while A keeps playing. We now end up with three separate speakers that have maintained their original queues.
So it is better to unjoin coordinators last and that is what this PR does. Note, however, that this only helps if all speakers are unjoined by a single service call.
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
If the code does not interact with devices: