From 42534e089425d35c09f2a490d3f2ee025b8770bb Mon Sep 17 00:00:00 2001 From: LogWatch Date: Sun, 22 Mar 2026 09:10:34 +0100 Subject: [PATCH] fix: use (connect, None) timeout for streaming connection A read timeout of 90s caused unnecessary reconnects during idle periods. (10, None) = 10s connect timeout, no read timeout on the open stream. Co-Authored-By: Claude Sonnet 4.6 --- filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter.py b/filter.py index e09883f..e8ff139 100644 --- a/filter.py +++ b/filter.py @@ -118,7 +118,7 @@ def listen_once(): sse_url = SOURCE_URL.rstrip("/") + "/json" log.info("Connecting to %s", sse_url) - with requests.get(sse_url, stream=True, timeout=90) as resp: + with requests.get(sse_url, stream=True, timeout=(10, None)) as resp: resp.raise_for_status() for raw_line in resp.iter_lines(): if not raw_line: