Skip to content

Fixed RxBleAdapterStateObservable leak.#864

Merged
dariuszseweryn merged 1 commit intomasterfrom
fix/bleadapterstate_leak
Jun 4, 2025
Merged

Fixed RxBleAdapterStateObservable leak.#864
dariuszseweryn merged 1 commit intomasterfrom
fix/bleadapterstate_leak

Conversation

@dariuszseweryn
Copy link
Copy Markdown
Owner

@dariuszseweryn dariuszseweryn commented Jun 3, 2025

Cause: the DisconnectionRouter did not properly cleaned up its state as long as neither the BluetoothGattCallback signalled a disconnection or Android did broadcast change in the BluetoothAdapter state. For cases when the connection unsubscription happened before the BluetoothGatt did started to connect (before BluetoothGattCallback#onConnectionStateChange was called, <~50 milliseconds) neither of these cases had place, causing a leak.

Fixes #851

@dariuszseweryn dariuszseweryn force-pushed the fix/bleadapterstate_leak branch from 4b0fd9b to 0e70169 Compare June 3, 2025 20:15
@dariuszseweryn dariuszseweryn merged commit 7f11356 into master Jun 4, 2025
5 checks passed
@dariuszseweryn dariuszseweryn deleted the fix/bleadapterstate_leak branch June 6, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant