Skip to content

Commit 33d18b9

Browse files
committed
refactor: extract last_failed variable for clarity in _connect_internal
1 parent 41ec538 commit 33d18b9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

getstream/video/rtc/connection_manager.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,15 +323,14 @@ async def _connect_internal(
323323
if not (ws_url or token):
324324
if self.user_id is None:
325325
raise ValueError("user_id is required for joining a call")
326+
last_failed = migrating_from_list[-1] if migrating_from_list else None
326327
join_response = await join_call(
327328
self.call,
328329
self.user_id,
329330
"auto",
330331
self.create,
331332
self.local_sfu,
332-
migrating_from=migrating_from_list[-1]
333-
if migrating_from_list
334-
else None,
333+
migrating_from=last_failed,
335334
migrating_from_list=migrating_from_list,
336335
**self.kwargs,
337336
)

0 commit comments

Comments
 (0)