mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
new: exposing ble.device.disconnected events via api.rest module
This commit is contained in:
parent
8115490d3a
commit
0810a1f2fe
1 changed files with 1 additions and 0 deletions
|
@ -34,6 +34,7 @@ func (mod *BLERecon) onPeriphDiscovered(p gatt.Peripheral, a *gatt.Advertisement
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mod *BLERecon) onPeriphDisconnected(p gatt.Peripheral, err error) {
|
func (mod *BLERecon) onPeriphDisconnected(p gatt.Peripheral, err error) {
|
||||||
|
mod.Session.Events.Add("ble.device.disconnected", mod.currDevice)
|
||||||
mod.setCurrentDevice(nil)
|
mod.setCurrentDevice(nil)
|
||||||
if mod.Running() {
|
if mod.Running() {
|
||||||
mod.Info("device disconnected, restoring discovery.")
|
mod.Info("device disconnected, restoring discovery.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue