From 148a129dce86868f457cf8ac5fd0972bb66a16fe Mon Sep 17 00:00:00 2001 From: Test User Date: Thu, 14 May 2026 19:58:08 +0800 Subject: [PATCH] fix: replace bare except clause with Exception in WebSocket heartbeat A bare `except:` catches everything including SystemExit and KeyboardInterrupt, making it impossible to gracefully shut down the server. Changed to `except Exception:` to match the intent while allowing system signals to propagate. Co-Authored-By: Claude Opus 4.7 --- server/app/domains/trigger/api/trigger_execution_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/app/domains/trigger/api/trigger_execution_controller.py b/server/app/domains/trigger/api/trigger_execution_controller.py index 1802aa773..1e5b33db8 100644 --- a/server/app/domains/trigger/api/trigger_execution_controller.py +++ b/server/app/domains/trigger/api/trigger_execution_controller.py @@ -336,7 +336,7 @@ async def send_heartbeat(): "type": "heartbeat", "timestamp": datetime.now(timezone.utc).isoformat() }) - except: + except Exception: break # Run both tasks concurrently