Skip to content

Commit 69ee3d2

Browse files
committed
types
1 parent 360270f commit 69ee3d2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

livekit-api/livekit/api/livekit_api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def __init__(
2828
api_key: Optional[str] = None,
2929
api_secret: Optional[str] = None,
3030
*,
31-
timeout: aiohttp.ClientTimeout = aiohttp.ClientTimeout(total=60), # 60 seconds
32-
session: aiohttp.ClientSession | None = None,
31+
timeout: Optional[aiohttp.ClientTimeout] = None,
32+
session: Optional[aiohttp.ClientSession] = None,
3333
):
3434
"""Create a new LiveKitAPI instance.
3535
@@ -50,6 +50,9 @@ def __init__(
5050
if not api_key or not api_secret:
5151
raise ValueError("api_key and api_secret must be set")
5252

53+
if not timeout:
54+
timeout = aiohttp.ClientTimeout(total=60)
55+
5356
self._custom_session = True if session is None else False
5457
self._session = session or aiohttp.ClientSession(timeout=timeout)
5558

0 commit comments

Comments
 (0)