aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/gcode.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-06-11 12:42:11 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-06-11 12:42:11 -0400
commit959509496a95a92dbd5b33427023ae7e65e70a65 (patch)
tree961f3e3fbac3d98dfe891e418ec29fd4ef1af6c7 /klippy/gcode.py
parent8419e152bbd23ae02e1728fe2466cdfbb2d1ddfa (diff)
downloadkutter-959509496a95a92dbd5b33427023ae7e65e70a65.tar.gz
kutter-959509496a95a92dbd5b33427023ae7e65e70a65.tar.xz
kutter-959509496a95a92dbd5b33427023ae7e65e70a65.zip
gcode: Fix regression causing lost asynchronous commands
Commit d0932009 introduced an error that could cause lost input in cases where the sender did not wait for an "ok" message before sending the next command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/gcode.py')
-rw-r--r--klippy/gcode.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py
index 8e1dca2b..4b1717b8 100644
--- a/klippy/gcode.py
+++ b/klippy/gcode.py
@@ -132,7 +132,8 @@ class GCodeParser:
self.cmd_M112({})
self.reactor.unregister_fd(self.fd_handle)
self.fd_handle = None
- return
+ while self.is_processing_data:
+ eventtime = self.reactor.pause(eventtime + 0.100)
self.is_processing_data = True
self.process_commands(lines)
self.is_processing_data = False