Skip to content

Commit 42ea29b

Browse files
authored
Merge pull request #624 from geeksville/pr-bletweak
bleak reads can hang if a device walks out of range, cope with that.
2 parents 9e71e85 + 111d61e commit 42ea29b

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
@@ -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)