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>
This commit is contained in:
parent
cf4bfb1119
commit
d90c3bc57a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue