aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/idle_timeout.py
diff options
context:
space:
mode:
authorEric Callahan <arksine.code@gmail.com>2021-10-27 14:41:33 -0400
committerKevinOConnor <kevin@koconnor.net>2021-10-29 18:39:47 -0400
commitd90c3bc57a5f0da29d944dd522bb4ca3cd7d0b39 (patch)
tree86317f00f93905e5eb51687c8418bfc62cbb5154 /klippy/extras/idle_timeout.py
parentcf4bfb11193525b06421b44d26ae041642d2a92f (diff)
downloadkutter-d90c3bc57a5f0da29d944dd522bb4ca3cd7d0b39.tar.gz
kutter-d90c3bc57a5f0da29d944dd522bb4ca3cd7d0b39.tar.xz
kutter-d90c3bc57a5f0da29d944dd522bb4ca3cd7d0b39.zip
idle_timeout: exit the timer if the printer is shutdown
This resolves an issue where the timer can get stuck in an attempt to transition from Ready to Idle if the printer is shutdown. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Diffstat (limited to 'klippy/extras/idle_timeout.py')
-rw-r--r--klippy/extras/idle_timeout.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/extras/idle_timeout.py b/klippy/extras/idle_timeout.py
index 9a4cd450..479c0b5c 100644
--- a/klippy/extras/idle_timeout.py
+++ b/klippy/extras/idle_timeout.py
@@ -71,6 +71,8 @@ class IdleTimeout:
# Idle timeout has elapsed
return self.transition_idle_state(eventtime)
def timeout_handler(self, eventtime):
+ if self.printer.is_shutdown():
+ return self.reactor.NEVER
if self.state == "Ready":
return self.check_idle_timeout(eventtime)
# Check if need to transition to "ready" state