From a64a9d203a4fd5e5c5c3d9d7543920286640528b Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Wed, 16 Oct 2024 12:13:30 -0700 Subject: [PATCH] Send the meshtastic.connection.lost message from BLEInterface's close method --- meshtastic/ble_interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshtastic/ble_interface.py b/meshtastic/ble_interface.py index ff4b5dd..12dbd07 100644 --- a/meshtastic/ble_interface.py +++ b/meshtastic/ble_interface.py @@ -218,7 +218,7 @@ class BLEInterface(MeshInterface): logging.error(f"Error closing mesh interface: {e}") if self._want_receive: - self.want_receive = False # Tell the thread we want it to stop + self._want_receive = False # Tell the thread we want it to stop if self._receiveThread: self._receiveThread.join( timeout=2 @@ -230,6 +230,7 @@ class BLEInterface(MeshInterface): self.client.disconnect() self.client.close() self.client = None + self._disconnected() # send the disconnected indicator up to clients class BLEClient: