Skip to content

Fix idle session recovery#347

Merged
LargeModGames merged 3 commits into
LargeModGames:mainfrom
shilicioo:fix/native-idle-recovery-bounded
Jul 6, 2026
Merged

Fix idle session recovery#347
LargeModGames merged 3 commits into
LargeModGames:mainfrom
shilicioo:fix/native-idle-recovery-bounded

Conversation

@shilicioo

Copy link
Copy Markdown
Contributor

Summary

Fixes #311

This keeps automatic native idle-session restoration, but limits it to two recovery attempts for the same stale session. After that, background polling stays passive instead of sending transfer(None) and activate() every 5-7 seconds while playback is paused or idle.

Recovery is enabled again after healthy playback or a new native player session, so startup/device restoration still works without forcing the user to manually select Spotatui.

Testing

  • cargo fmt --all
  • cargo test idle_
  • cargo test --no-default-features --features telemetry
  • cargo clippy --no-default-features --features telemetry -- -D warnings
  • cargo test
  • cargo run

Additional notes

Checked logs after testing. The latest log showed two recovery attempts and then stopped, instead of repeating every 5-7 seconds. Older long-running logs showed hundreds or thousands of repeated attempts.

@LargeModGames LargeModGames merged commit d953094 into LargeModGames:main Jul 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native playback recovery behavior

2 participants