Skip to content

fix(transport): remove BLE Enable() idempotency workaround - #104

Merged
retr0h merged 1 commit into
mainfrom
fix/remove-ble-enable-workaround
May 16, 2026
Merged

fix(transport): remove BLE Enable() idempotency workaround#104
retr0h merged 1 commit into
mainfrom
fix/remove-ble-enable-workaround

Conversation

@retr0h

@retr0h retr0h commented May 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bumps tinygo.org/x/bluetooth to the commit containing tinygo-org/bluetooth#445, which makes Adapter.Enable() safely re-callable on macOS
  • Removes the process-level enableBLEAdapterOnce mutex+cache guard that worked around the v0.15.0 "already calling Enable function" bug
  • DialBLE and ScanBLE now call adapter.Enable() directly — the reconnect loop no longer needs a workaround to retry after transport drops

Test plan

  • just ready passes (confirmed locally — 0 lint issues)
  • BLE dial + reconnect cycle on macOS: verify second Enable() no longer returns "already calling Enable function"
  • BLE scan after a prior session tear-down works without restart

🤖 Generated with Claude Code

tinygo-org/bluetooth#445 landed the upstream fix making
Adapter.Enable() safely re-callable on the same *Adapter on macOS.
Bump the dependency and remove our process-level mutex+cache guard
that worked around the v0.15.0 "already calling Enable function" bug.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@retr0h
retr0h merged commit 6622e0f into main May 16, 2026
7 checks passed
@retr0h
retr0h deleted the fix/remove-ble-enable-workaround branch May 16, 2026 23:41
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.

1 participant