fix(android): v0.1.1 verification-pass polish (CancellationException + backoff clamp) - #362
Merged
Merged
Conversation
… HA/motion poll backoff From the v0.1.1 Fable verification of the Android fixes: - The four scopedUrl() guards used plain runCatching, which swallows the CancellationException thrown when a seek/camera-switch cancels the token fetch mid-flight — so a cancelled seek still ran .onFailure (error flash / torn-down player) and the filmstrip path wrote a cancelled job's frames into the new camera's state. Switch to the repo's runCatchingCancellable (made internal) which re-throws CancellationException so cancelled work propagates cleanly while real failures still degrade gracefully. - The exponential poll backoff (2000L shl (failStreak-1)) overflowed to a negative/zero delay after ~54 consecutive failures, producing a request burst. Clamp the shift exponent at 4 (still reaches the 30s ceiling). Signed-off-by: badbread <badbread@users.noreply.github.com>
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.
Follow-ups from the v0.1.1 Fable verification of the merged Android fixes.
CancellationException— the fourscopedUrl()guards used plainrunCatching, which swallows theCancellationExceptionthrown when a seek / camera-switch cancels the token fetch mid-flight. So a cancelled seek still ran.onFailure(error flash / torn-down player) and the filmstrip path wrote a cancelled job's frames into the new camera's state. Switched to the repo'srunCatchingCancellable(madeinternal), which re-throwsCancellationExceptionso cancelled work propagates cleanly while real failures still degrade gracefully.2000L shl (failStreak-1)overflowed to a negative/zero delay after ~54 consecutive failures (a request burst). Clamped the shift exponent at 4 (still reaches the 30 s ceiling). Applied to both the HA-states and motion polls.🤖 Generated with Claude Code