File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments