Repository navigation
v0.2.3 — drop spurious is_connected probe
Fixed
-
Eliminated a class of false-positive disconnects. The per-tick `peripheral.is_connected()` probe introduced earlier as a cheap keepalive turned out to stall for >5s under heavy write activity on CoreBluetooth — not because the device was actually stuck, but because the call serialized behind other in-flight btleplug operations. Each stall tripped the timeout and forced a full reconnect cycle (~15s of lost display time).
Observed in the wild: ~2 out of every 3 disconnects were the probe misfiring rather than the device actually going away. Removed entirely. Real disconnects are still caught by:
- Write path — explicit `Device disconnected` errors break out of the inner loop immediately.
- 30s heartbeat — the brightness ping in the `else` branch detects silent disconnects during idle periods.
- v0.2.0 watchdog — final safety net if the loop stops making progress.