From 027f52087cbaba86533a44c20099281c28d89e6a Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 1 Mar 2019 10:06:44 -0500 Subject: [PATCH] gcode: Improve handling of end of input when reading from a debug file Signed-off-by: Kevin O'Connor --- klippy/gcode.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/klippy/gcode.py b/klippy/gcode.py index 6a8674b0..7be039cb 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -224,6 +224,8 @@ class GCodeParser: # Special handling for debug file input EOF if not data and self.is_fileinput: if not self.is_processing_data: + self.reactor.unregister_fd(self.fd_handle) + self.fd_handle = None self.request_restart('exit') pending_commands.append("") # Handle case where multiple commands pending