fix: fixed a bug which made ble.enum work only once per execution (fixes #163)

This commit is contained in:
evilsocket 2019-02-14 13:33:01 +01:00
commit 1fa9160407
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -32,9 +32,9 @@ func (mod *BLERecon) onPeriphDisconnected(p gatt.Peripheral, err error) {
if mod.Running() {
// restore scanning
mod.Info("device disconnected, restoring discovery.")
mod.setCurrentDevice(nil)
mod.gattDevice.Scan([]gatt.UUID{}, true)
}
mod.setCurrentDevice(nil)
}
func (mod *BLERecon) onPeriphConnected(p gatt.Peripheral, err error) {