started structuring project for testing + lint driven various refactoring

This commit is contained in:
evilsocket 2018-04-24 15:12:25 +02:00
parent 64099bc1fb
commit bc3be7dd2b
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
5 changed files with 17 additions and 18 deletions

View file

@ -241,8 +241,11 @@ func (d *BLERecon) onPeriphDisconnected(p gatt.Peripheral, err error) {
}
func (d *BLERecon) onPeriphConnected(p gatt.Peripheral, err error) {
// timed out
if d.currDevice == nil {
if err != nil {
log.Warning("Connected to %s but with error: %s", p.ID(), err)
return
} else if d.currDevice == nil {
// timed out
log.Warning("Connected to %s but after the timeout :(", p.ID())
return
}