Skip to content

Commit

Permalink
Merge pull request #695 from ianmcorvidae/ble-disconnect
Browse files Browse the repository at this point in the history
Send the meshtastic.connection.lost message from BLEInterface's close method
  • Loading branch information
ianmcorvidae authored Oct 16, 2024
2 parents 3afb294 + a64a9d2 commit a43dd20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meshtastic/ble_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def close(self):
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
Expand All @@ -230,6 +230,7 @@ def close(self):
self.client.disconnect()
self.client.close()
self.client = None
self._disconnected() # send the disconnected indicator up to clients


class BLEClient:
Expand Down

0 comments on commit a43dd20

Please sign in to comment.