From 959509496a95a92dbd5b33427023ae7e65e70a65 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 11 Jun 2017 12:42:11 -0400 Subject: [PATCH] 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 --- klippy/gcode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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