From 867eefdd9fa7759ad4b6a1a32f86f1876e251964 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:10:25 -0700 Subject: [PATCH] fix(signal): track SSE keepalive comments as connection activity (#3316) signal-cli sends SSE comment lines (':') as keepalives every ~15s. The SSE listener only counted 'data:' lines as activity, so the health monitor reported false idle warnings every 2 minutes during quiet periods. Recognize ':' lines as valid activity per the SSE spec. Salvaged from PR #2938 by ticketclosed-wontfix. --- gateway/platforms/signal.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gateway/platforms/signal.py b/gateway/platforms/signal.py index 39c3814fb..cbe12a87c 100644 --- a/gateway/platforms/signal.py +++ b/gateway/platforms/signal.py @@ -279,6 +279,12 @@ class SignalAdapter(BasePlatformAdapter): line = line.strip() if not line: continue + # SSE keepalive comments (":") prove the connection + # is alive — update activity so the health monitor + # doesn't report false idle warnings. + if line.startswith(":"): + self._last_sse_activity = time.time() + continue # Parse SSE data lines if line.startswith("data:"): data_str = line[5:].strip()