/
/
/
# What does this implement/fix? Sonos S1 asked speakers for their details on the main thread, so the whole server paused for a few seconds per speaker every time discovery ran — at startup and again every 30 minutes. With a handful of speakers that is a noticeable freeze of the UI and of playback commands. Pausing a speaker did the same thing on a smaller scale: it asked the speaker whether it supports pause before doing anything else, which stalls everything if that speaker has dropped off the network. While working on that path it turned out a speaker that gets a new IP address never recovers either. The new address was written onto a device object whose connection details are fixed the moment it is created, so every command kept going to the old address. The reachability check also ran against the old address before the switch, so it always failed and the new address was dropped. The speaker now reconnects through the device that discovery just found at the new address. **Related issue (if applicable):** - n/a ## Types of changes - [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [x] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` Changes: - Speaker lookups during discovery and player setup now run in a background thread instead of on the main thread. - Pausing no longer asks the speaker about its capabilities on the main thread. - A speaker found at another address is reconnected using the device discovery returned for it, is checked at that new address rather than the old one, and counts as reachable again right away. - `check_blocking_io` now knows about `soco` and its UPnP service proxies, so a call like this cannot creep back in unnoticed. ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.