From 4ac8476f74473461b80ff392799d0a1b42b59ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 22 Jun 2020 10:00:34 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=20Make=20sure=20we=20read=20at=20leas?= =?UTF-8?q?t=201=20byte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See comment to 7290a6d35063ff9bbc08e6427be087e2bdae6c87 --- src/octoprint/util/comm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 673affa72..b6b0db202 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -5022,7 +5022,7 @@ class BufferedReadlineWrapper(wrapt.ObjectProxy): timeout = serial.Timeout(self._timeout) while not timeout.expired(): - self._buffered += self.read(self.in_waiting) + self._buffered += self.read(min(self.in_waiting, 1)) # check for terminator, if it's there we have found our line termpos = self._buffered.find(terminator)