Skip to content

Commit 111d61e

Browse files
committed
bleak reads can hang if a device walks out of range, cope with that.
1 parent 9e71e85 commit 111d61e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

meshtastic/ble_interface.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def close(self):
205205

206206
if self._want_receive:
207207
self.want_receive = False # Tell the thread we want it to stop
208-
self._receiveThread.join()
208+
self._receiveThread.join(timeout=2) # If bleak is hung, don't wait for the thread to exit (it is critical we disconnect)
209209
self._receiveThread = None
210210

211211
if self.client:

0 commit comments

Comments
 (0)