Skip to content

Commit 01f05e7

Browse files
committed
fix types
1 parent ae6c93c commit 01f05e7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

livekit-api/livekit/api/sip_service.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,16 @@ async def create_sip_participant(
434434
"""
435435
client_timeout: Optional[aiohttp.ClientTimeout] = None
436436
if timeout:
437+
# obay user specified timeout
437438
client_timeout = aiohttp.ClientTimeout(total=timeout)
438439
elif create.wait_until_answered:
439-
# ensure timeout isn't too short when using sync mode
440-
if self._client._session.timeout and self._client._session.timeout.total < 10:
441-
client_timeout = aiohttp.ClientTimeout(total=30)
440+
# ensure default timeout isn't too short when using sync mode
441+
if (
442+
self._client._session.timeout
443+
and self._client._session.timeout.total
444+
and self._client._session.timeout.total < 20
445+
):
446+
client_timeout = aiohttp.ClientTimeout(total=20)
442447

443448
try:
444449
return await self._client.request(

0 commit comments

Comments
 (0)