Skip to content

Commit 7af9a36

Browse files
committed
fix: sync client
1 parent 57c66db commit 7af9a36

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

replane/_sync.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,20 +359,23 @@ def _connect_stream(self) -> None:
359359
)
360360

361361
# Create connection
362+
# Note: SSE connections are long-lived, so we use the inactivity timeout
363+
# rather than the short request timeout. The inactivity timeout is used
364+
# for detecting dead connections during streaming.
362365
conn: http.client.HTTPConnection
363366
if is_https:
364367
context = ssl.create_default_context()
365368
conn = http.client.HTTPSConnection(
366369
host,
367370
port,
368-
timeout=self._request_timeout,
371+
timeout=self._inactivity_timeout,
369372
context=context,
370373
)
371374
else:
372375
conn = http.client.HTTPConnection(
373376
host,
374377
port,
375-
timeout=self._request_timeout,
378+
timeout=self._inactivity_timeout,
376379
)
377380

378381
try:

0 commit comments

Comments
 (0)