RxFitbitGatt / com.fitbit.bluetooth.fbgatt.rx / com.fitbit.bluetooth.fbgatt.GattConnection / resetGattStateIfNecessary

resetGattStateIfNecessary

fun GattConnection.resetGattStateIfNecessary(t: Throwable, stateSetter: GattClientConnectionStateSetter = GattClientConnectionStateSetter()): Completable

Extension function to reset Gatt state to GattState.IDLE on GattTransactionException

Note: This helper should only be used for transaction failures you know are not catastrophic and you can recover for simply resetting them