a possible but untested fix for #41

This commit is contained in:
Kevin Hester
2020-12-13 13:12:44 +08:00
parent 11f8c33e88
commit 1eb47a29e0

View File

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