From fc2d33ca7351b84052d286a50a25223f1f40047d Mon Sep 17 00:00:00 2001 From: Mahmudul Alam Date: Mon, 9 Mar 2026 08:23:26 +0600 Subject: [PATCH] feat: Set websocket `ping_interval` and `ping_timeout` for `run_forever` to improve connection stability. --- Framework/Utilities/live_log_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Framework/Utilities/live_log_service.py b/Framework/Utilities/live_log_service.py index 1d13d4e2..1df21677 100644 --- a/Framework/Utilities/live_log_service.py +++ b/Framework/Utilities/live_log_service.py @@ -233,7 +233,11 @@ def run_ws_thread(): next_ws = _build_websocket(ws_url) with connection_lock: ws = next_ws - next_ws.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE}) + next_ws.run_forever( + sslopt={"cert_reqs": ssl.CERT_NONE}, + ping_interval=15, + ping_timeout=10 + ) except Exception as e: _log(f"Connection attempt failed: {e}") finally: