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
This commit is contained in:
Gina Häußge 2016-08-16 09:29:29 +02:00
parent b05beb27b5
commit 217e54d81c

View file

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