Skip to content

Commit

Permalink
Fixes centralManager delegate being set to nil on disconnect (#29)
Browse files Browse the repository at this point in the history
* Fixes centralManager delegate being set to nil on disconnect

* Removes centralManager.delegate = nil on peripheral disconnect
  • Loading branch information
lm2s authored and bgiori committed Sep 25, 2019
1 parent 40491c5 commit b1d9da9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Source/Bluetooth/McuMgrBleTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ extension McuMgrBleTransport: CBCentralManagerDelegate {
return
}
Log.i(TAG, msg: "Peripheral disconnected")
centralManager.delegate = nil
peripheral.delegate = nil
smpCharacteristic = nil
lock.open(McuMgrTransportError.disconnected)
Expand Down

0 comments on commit b1d9da9

Please sign in to comment.