fix: add timeout for characteristic rediscovery hang #16
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "schwifty/fix-rediscovery-hang"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
App gets stuck at "Re-discovering characteristics..." and never recovers.
When FFE2 (command characteristic) goes missing mid-write, the code enters a rediscovery path that calls
discoverCharacteristics()— but if CoreBluetooth never firesdidDiscoverCharacteristicsForback (common with flaky BLE), there's no timeout. The write timeout was already cancelled, and the 90s global timeout may have mostly elapsed.Fix
charRediscoveryTimerfor the rediscovery path.timeoutcleanup()No more hanging.
Pull request closed