Skip to content

Commit a43dd20

Browse files
authored
Merge pull request #695 from ianmcorvidae/ble-disconnect
Send the meshtastic.connection.lost message from BLEInterface's close method
2 parents 3afb294 + a64a9d2 commit a43dd20

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

meshtastic/ble_interface.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def close(self):
218218
logging.error(f"Error closing mesh interface: {e}")
219219

220220
if self._want_receive:
221-
self.want_receive = False # Tell the thread we want it to stop
221+
self._want_receive = False # Tell the thread we want it to stop
222222
if self._receiveThread:
223223
self._receiveThread.join(
224224
timeout=2
@@ -230,6 +230,7 @@ def close(self):
230230
self.client.disconnect()
231231
self.client.close()
232232
self.client = None
233+
self._disconnected() # send the disconnected indicator up to clients
233234

234235

235236
class BLEClient:

0 commit comments

Comments
 (0)