Track failed playback commands with bounded retry backoff#259
Open
msgerbush wants to merge 4 commits into
Open
Track failed playback commands with bounded retry backoff#259msgerbush wants to merge 4 commits into
msgerbush wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the first PR in the Sonos stale-IP recovery stack (refs #258). The original issue was triggered when the selected Sonos speaker changed LAN IPs, leaving the running process with a stale SoCo connection. A later
pause()call then failed withNo route to host.This PR does not re-resolve stale Sonos speakers yet. Instead, it makes playback command failures safe in the domain state machine:
PlaybackCommandRetrytoPlaybackSessionplay,resume,pause, orstopsucceedspaused_atwhenpause()did not actually pause playbackBehavior
When a playback command raises
PlaybackError, the session now records retry metadata and leaves the logical playback state unchanged. Matching actions are retried after backoff; unrelated actions can clear or replace the retry state.This prevents failed commands from making the app believe Sonos changed state when it did not.
Notes
pause), then the jukebox state will be stuck until another event is initiated