diff options
author | Eric Callahan <arksine.code@gmail.com> | 2021-10-27 14:41:33 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2021-10-29 18:39:47 -0400 |
commit | d90c3bc57a5f0da29d944dd522bb4ca3cd7d0b39 (patch) | |
tree | 86317f00f93905e5eb51687c8418bfc62cbb5154 /klippy/extras/idle_timeout.py | |
parent | cf4bfb11193525b06421b44d26ae041642d2a92f (diff) | |
download | kutter-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.py | 2 |
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 |