From 1eb47a29e0b4b95480795157d98ae4a44033594d Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Sun, 13 Dec 2020 13:12:44 +0800 Subject: [PATCH] a possible but untested fix for #41 --- meshtastic/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 3c1578e..0d2cd03 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -614,6 +614,8 @@ class StreamInterface(MeshInterface): """Write an array of bytes to our stream and flush""" self.stream.write(b) self.stream.flush() + while self.stream.out_waiting != 0: + time.sleep(0.1) # It seems that on windows flush might return before all bytes actually sent? def _readBytes(self, len): """Read an array of bytes from our stream"""