🐛 Only ever send 1 line on continue_sending

Otherwise we might spam our send queue leading to a bunch of lines
piling up inside it, making cancelling/pausing take longer and longer.

Potential fix for #3649
This commit is contained in:
Gina Häußge committed 2020-07-22 14:31:50 +02:00
1 parent f62addc5e8
commit d47ea73dfc
1 file changed
+4 -2
+4 -2
View File
@@ -2486,8 +2486,10 @@ class MachineCom(object):
self._heating = False
def _continue_sending(self):
while self._active:
job_active = self._state in (self.STATE_STARTING, self.STATE_PRINTING) and not (self._currentFile is None or self._currentFile.done or self.isSdPrinting())
# Ensure we have at least one line in the send queue, but don't spam it
while self._active and not self._send_queue.qsize():
job_active = self._state in (self.STATE_STARTING, self.STATE_PRINTING) \
and not (self._currentFile is None or self._currentFile.done or self.isSdPrinting())
if self._send_from_command_queue():
# we found something in the command queue to send