mirror of
https://github.com/meshtastic/python.git
synced 2026-09-14 22:39:18 -04:00
Correctly call self.close() in disconnected_callback for bleak (fixes #770)
This commit is contained in:
1 file changed
+1
-1
@@ -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