fix: made BLE module less verbose by switching some of the logs to debug ones

This commit is contained in:
evilsocket 2019-04-21 14:00:43 +02:00
commit 5a62546c50
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
3 changed files with 7 additions and 6 deletions

View file

@ -39,7 +39,7 @@ func NewBLERecon(s *session.Session) *BLERecon {
gattDevice: nil,
quit: make(chan bool),
done: make(chan bool),
connTimeout: time.Duration(10) * time.Second,
connTimeout: time.Duration(5) * time.Second,
currDevice: nil,
connected: false,
}
@ -264,6 +264,7 @@ func (mod *BLERecon) enumAllTheThings(mac string) error {
go func() {
time.Sleep(mod.connTimeout)
if mod.isEnumerating() && !mod.connected {
mod.Warning("connection timeout")
mod.Session.Events.Add("ble.connection.timeout", mod.currDevice)
mod.onPeriphDisconnected(nil, nil)
}