You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a connection error happens the ConnectionOperationQueue is always terminated with the BleDisconnectedException even when a different error has caused the disconnection
Library version
1.4.1
Steps to reproduce actual result
1. Connect to a device
2. Make the BluetoothGattCallback.onConnectionStateChange() to be called with status!=GATT_SUCCESS so the operation would fail with BleGattException(status, ON_CONNECTION_STATE)
3. Try to schedule a new operation and observe it will fail with BleDisconnectedException instead of the error from Step 2.
Actual result
BleDisconnectedException
Expected result
BleGattException
The text was updated successfully, but these errors were encountered:
As long as the user is interested in the connection the `ConnectionOperationQueue` will check the `DisconnectionRouterOutput` for exceptions that cause disconnection. If this exception is emitted the `ConnectionOperationQueue` terminates itself with the emitted error. If the user unsubscribes from the `RxBleDevice.establishConnection()` then the `ConnectionOperationQueue` terminates itself with the `BleDisconnectedException` as it was before this change.
Terminate ConnectionOperationQueue with proper exception
As long as the user is interested in the connection the `ConnectionOperationQueue` will check the `DisconnectionRouterOutput` for exceptions that cause disconnection. If this exception is emitted the `ConnectionOperationQueue` terminates itself with the emitted error. If the user unsubscribes from the `RxBleDevice.establishConnection()` then the `ConnectionOperationQueue` terminates itself with the `BleDisconnectedException` as it was before this change. Fix#297
Summary
When a connection error happens the
ConnectionOperationQueue
is always terminated with theBleDisconnectedException
even when a different error has caused the disconnectionLibrary version
1.4.1
Steps to reproduce actual result
1. Connect to a device
2. Make the
BluetoothGattCallback.onConnectionStateChange()
to be called withstatus!=GATT_SUCCESS
so the operation would fail withBleGattException(status, ON_CONNECTION_STATE)
3. Try to schedule a new operation and observe it will fail with
BleDisconnectedException
instead of the error from Step 2.Actual result
BleDisconnectedException
Expected result
BleGattException
The text was updated successfully, but these errors were encountered: