/
/
# What does this implement/fix? Seeking tore down the whole AirPlay connection and built it up again: a new streaming process plus a clock probe, roughly two seconds before the audio came back, with a "Warm replacement failed" warning in the log every time. The queue ends a stream not only when it has played the queue out, but also when it is about to start the next one right away. The AirPlay session treated both the same and told the speaker "this was the last of the audio", which cannot be taken back — so the new stream that arrived a moment later had no connection left to reuse. It now only says that while the queue is starting a stream to take over, so a seek reuses the live connection instead. Most noticeable on sources that hand over their audio at playback pace (Spotify through the Soloist backend), where the new stream always takes long enough for the old one to hit this. **Related issue (if applicable):** - found while investigating #5918 ## Types of changes - [x] 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` - [ ] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` Changes: - the audio EOF is written only when the queue is not replacing the session - `AsyncProcess` tracks that stdin was closed, so `can_replace`/`standby` stop claiming a stream that can no longer be fed - tests for both ## 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.