gcode: Improve handling of end of input when reading from a debug file

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-03-01 10:06:44 -05:00
parent 69491e2dab
commit 027f52087c
1 changed files with 2 additions and 0 deletions

View File

@ -224,6 +224,8 @@ class GCodeParser:
# Special handling for debug file input EOF # Special handling for debug file input EOF
if not data and self.is_fileinput: if not data and self.is_fileinput:
if not self.is_processing_data: if not self.is_processing_data:
self.reactor.unregister_fd(self.fd_handle)
self.fd_handle = None
self.request_restart('exit') self.request_restart('exit')
pending_commands.append("") pending_commands.append("")
# Handle case where multiple commands pending # Handle case where multiple commands pending