fix(audio_key): retry on timeout and fail track cleanly on key error - #1748
Open
stiefenm wants to merge 1 commit into
Open
fix(audio_key): retry on timeout and fail track cleanly on key error#1748stiefenm wants to merge 1 commit into
stiefenm wants to merge 1 commit into
Conversation
Audio key requests now retry up to 2 times on timeout before giving up, improving resilience after access-point reconnects. Audio key transport failures (timeout, channel error) now fail the track cleanly instead of continuing without decryption, which always failed downstream and dropped the session. Rebased from librespot-org#1743 onto current dev HEAD.
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
Rebased version of #1743 (source branch was accidentally deleted).
Context
After an access-point reconnect, the first audio key request often times out (1.5s default). Without retry, this fails the track. With the AP connection already restored, a retry succeeds immediately.
The second change stops the player from attempting to play encrypted audio without a decryption key — the old "try without decryption" fallback was never useful for encrypted files and produced broken audio or a dropped session.
Changes
core/src/audio_key.rs: Wraprequest()in retry loop (up to 2 retries on timeout), clean up pending entry on timeoutplayback/src/player.rs: DistinguishErrorKind::Unavailable(unencrypted file, continue) from other errors (fail track)CHANGELOG.md: Document both fixes