You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bc4e386
Browse filesBrowse the repository at this point in the historyBrowse files
TwirpClient.request forwarded its `timeout` argument to session.post even
when it was None. aiohttp reads an explicit `timeout=None` as "no timeout
at all" — only a *missing* argument selects the session timeout — so every
call that did not pass its own timeout ran unbounded and the session's
10s default never applied.
A host that accepts the connection and never answers therefore blocked the
call forever, and region failover never started, because failover only
begins once an attempt fails. The same function already read
`self._session.timeout.total` to size the failover budget, so it assumed
the session timeout governed the request while the post call discarded it.
Resolve the timeout once, per call override -> client default -> session,
and pass the result explicitly, so both uses agree.
Also make `LiveKitAPI(timeout=...)` mean something when the caller supplies
a session. It was read only on the path where the SDK built the session, so
`LiveKitAPI(session=..., timeout=...)` silently ignored the timeout even
though it is documented as the request timeout. The value now reaches
TwirpClient through Service, letting a caller give API calls a deadline
without changing the timeout of other traffic on a shared session. A
supplied session with no explicit timeout keeps its own, as before.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Apply a timeout to every API request. Requests previously ignored the session timeout and waited indefinitely, so a host that accepted the connection but never answered blocked the call and prevented region failover. `LiveKitAPI(timeout=...)` now also applies when a session is supplied by the caller, giving API calls a deadline without changing the timeout of other traffic sharing that session.
0 commit comments