Skip to content

Commit

Permalink
M32/M37 could override the file being printed
Browse files Browse the repository at this point in the history
Fixes #206
  • Loading branch information
chrishamm committed Oct 9, 2024
1 parent 01da239 commit ec9481c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DuetControlServer/Codes/Handlers/MCodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public static class MCodes

using (await JobProcessor.LockAsync(code.CancellationToken))
{
if (!code.IsFromFileChannel && JobProcessor.IsProcessing)
if (!code.IsFromFileChannel && (JobProcessor.IsProcessing || JobProcessor.IsPaused))
{
return new Message(MessageType.Error, "Cannot set file to print, because a file is already being printed");
}
Expand Down Expand Up @@ -425,7 +425,7 @@ public static class MCodes

using (await JobProcessor.LockAsync(code.CancellationToken))
{
if (!code.IsFromFileChannel && JobProcessor.IsProcessing)
if (!code.IsFromFileChannel && (JobProcessor.IsProcessing || JobProcessor.IsPaused))
{
return new Message(MessageType.Error, "Cannot set file to simulate, because a file is already being printed");
}
Expand Down

0 comments on commit ec9481c

Please sign in to comment.