From 302df255db419eddcf65095fe4fa9fbbe8d6ec37 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 6 Oct 2025 21:37:31 -0400 Subject: [PATCH] klippy: Verify nothing attempts to pause in the klippy:ready event Signed-off-by: Kevin O'Connor --- klippy/klippy.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/klippy/klippy.py b/klippy/klippy.py index de24da2af..5f0ea4633 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -158,10 +158,11 @@ class Printer: return try: self._set_state(message_ready) - for cb in self.event_handlers.get("klippy:ready", []): - if self.state_message is not message_ready: - return - cb() + with self.reactor.assert_no_pause(): + for cb in self.event_handlers.get("klippy:ready", []): + if self.state_message is not message_ready: + return + cb() except Exception as e: logging.exception("Unhandled exception during ready callback") self.invoke_shutdown("Internal error during ready callback: %s"