From 217e54d81cf1844e768181ef64751eef2398f96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 16 Aug 2016 09:29:29 +0200 Subject: [PATCH] Make sure we are still in printing state before sending next line We might just have "eaten" a line used for triggering a pause (e.g. an M0) and thus might not be eligible to send the next line from the streamed file anymore. Solves #1448 --- src/octoprint/util/comm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 835887ae..7b52046c 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1672,6 +1672,10 @@ class MachineCom(object): with self._sendNextLock: while self._active: # we loop until we've actually enqueued a line for sending + if self._state != self.STATE_PRINTING: + # we are no longer printing, return false + return False + line = self._getNext() if line is None: # end of file, return false