Skip to content

Commit 9281c4a

Browse files
committed
Correctly call self.close() in disconnected_callback for bleak (fixes #770)
1 parent 3c2dd6f commit 9281c4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

meshtastic/ble_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def connect(self, address: Optional[str] = None) -> "BLEClient":
174174

175175
# Bleak docs recommend always doing a scan before connecting (even if we know addr)
176176
device = self.find_device(address)
177-
client = BLEClient(device.address, disconnected_callback=lambda _: self.close)
177+
client = BLEClient(device.address, disconnected_callback=lambda _: self.close())
178178
client.connect()
179179
client.discover()
180180
return client

0 commit comments

Comments
 (0)