From e748b52098efe7d233fe50fc5fe7ebf37805ebcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 4 Mar 2019 17:29:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Don't=20change=20to=20PAUSED=20s?= =?UTF-8?q?tate=20if=20not=20PAUSING?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #2955 --- src/octoprint/util/comm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 59a2467dd..6820defb4 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -1280,7 +1280,10 @@ class MachineCom(object): user=user) def finalize(): - self._changeState(self.STATE_PAUSED) + # only switch to PAUSED if we were still PAUSING, to avoid "swallowing" received resumes during + # pausing + if self._state == self.STATE_PAUSING: + self._changeState(self.STATE_PAUSED) self.sendCommand(SendQueueMarker(finalize), part_of_job=True) self._continue_sending()