mirror of
https://github.com/meshtastic/python.git
synced 2026-04-17 21:42:20 -04:00
Correctly call self.close() in disconnected_callback for bleak (fixes #770)
This commit is contained in:
@@ -174,7 +174,7 @@ class BLEInterface(MeshInterface):
|
||||
|
||||
# Bleak docs recommend always doing a scan before connecting (even if we know addr)
|
||||
device = self.find_device(address)
|
||||
client = BLEClient(device.address, disconnected_callback=lambda _: self.close)
|
||||
client = BLEClient(device.address, disconnected_callback=lambda _: self.close())
|
||||
client.connect()
|
||||
client.discover()
|
||||
return client
|
||||
|
||||
Reference in New Issue
Block a user