Files
swiftcontrol/lib/bluetooth/emulation
Jonas Acker 28c427e0a2 fix(bluetooth): a controller that times out connecting is tried again
On macOS/iOS a connect that never completes ends in a TimeoutException
from UniversalBle.connect with no disconnected event afterwards. The
retry path only existed in the connection-state listener (drop the
device, clear the scan dedupe, let rediscovery re-add it), so the device
stayed in the list unconnected, every later scan result was filtered out
as already known, and it was never tried again.

A failed queue connect now schedules a quiet retry of the same device
(5 s, doubling, capped at 60 s). Any disconnect of the device - forget,
in-place "No connection", the Android drop path - cancels it, including
one that lands while the attempt is still in flight; a successful or
explicit connect resets the streak. Trainers are excluded (twin-gated).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 19:51:42 +02:00
..