Please sign in to comment.
Only prevent command processing if streaming AND printing
Otherwise we might run into a rare race condition where the M110 sent on start of a SD card upload gets prepared for sending after the source file is already opened. That would then lead to the M110 not getting processed anymore by OctoPrint and hence the line number counter not resetting accordingly, leading to one line number mismatch after the next from the firmware. Testing if our "isPrinting" flag is ALSO set to true here ensures that we'll only stop processing commands internally once the state has actually switched to printing, which only happens after the firmware responds to the M28 sent after the M110. Fixes #1882 and probably also the issue encountered by @amd989 in #1762 (which looks like exactly the same problem)
- Loading branch information...