Skip to content

Commit

Permalink
Re-enable currentCentralManagerCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
weliem committed Mar 3, 2022
1 parent 327aadb commit 58f32c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ class BluetoothCentralManager(private val context: Context) {

scannedPeripherals.remove(peripheral.address)
unconnectedPeripherals[peripheral.address] = peripheral
// currentCentralManagerCallback = resultCentralManagerCallback
currentCentralManagerCallback = resultCentralManagerCallback
peripheral.connect()
}
}
Expand Down Expand Up @@ -559,7 +559,7 @@ class BluetoothCentralManager(private val context: Context) {

// Only cancel connections if it is an known peripheral
if (unconnectedPeripherals.containsKey(peripheralAddress) || connectedPeripherals.containsKey(peripheralAddress)) {
// currentCentralManagerCallback = resultCentralManagerCallback
currentCentralManagerCallback = resultCentralManagerCallback
peripheral.cancelConnection()
} else {
Logger.e(TAG, "cannot cancel connection to unknown peripheral %s", peripheralAddress)
Expand Down

0 comments on commit 58f32c9

Please sign in to comment.