Skip to content

fix: stop a slow release from stranding a peripheral - #160

Merged
MegaManSec merged 8 commits into
mainfrom
fix/slow-release-strand
Nov 5, 2026
Merged

MegaManSec merged 8 commits into
mainfrom
fix/slow-release-strand

Conversation

@MegaManSec

@MegaManSec MegaManSec commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Fixes #159: a release over 2s failed the take and stranded the peripheral.

  • Wait up to 15s for a release (taker waits 30s).
  • Failed take: keep watching 30s while the peer finishes.
  • Roll a timed-out send back onto this Mac.
  • Mid-release, reclaim only on the peer's explicit "not holding"; an unreachable peer means wait.
  • Timed-out single send rolls back through connectPeripheral, like the full-set send.
  • With auto-reconnect off, a failed take polls the peer itself for the 30s grace, so the fix does not depend on the watcher.

Untested on two Macs.

@MegaManSec
MegaManSec merged commit 5adc8c4 into main Nov 5, 2026
2 checks passed
@MegaManSec
MegaManSec deleted the fix/slow-release-strand branch November 5, 2026 22:32
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.30.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Take fails and strands the peripheral when the other Mac needs more than 2s to release it

1 participant