fix: use (connect, None) timeout for streaming connection
Some checks failed
Build & Push Docker Image / build (push) Failing after 6s
Some checks failed
Build & Push Docker Image / build (push) Failing after 6s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -118,7 +118,7 @@ def listen_once():
|
|||||||
sse_url = SOURCE_URL.rstrip("/") + "/json"
|
sse_url = SOURCE_URL.rstrip("/") + "/json"
|
||||||
log.info("Connecting to %s", sse_url)
|
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()
|
resp.raise_for_status()
|
||||||
for raw_line in resp.iter_lines():
|
for raw_line in resp.iter_lines():
|
||||||
if not raw_line:
|
if not raw_line:
|
||||||
|
|||||||
Reference in New Issue
Block a user