Skip to content

Commit 4bbf8c0

Browse files
committed
fix(rtc): correct join_response attribute access in FAST reconnect
`ConnectionManager._connect_internal` stores `join_response.data` as `self.join_response` (see `connection_manager.py:387`), so credentials live at the top level. `_reconnect_fast` was reading `self.join_response.data.credentials.token`, which raises `AttributeError: 'JoinCallResponse' object has no attribute 'data'` the first time a FAST reconnect actually runs. This codepath was never exercised before because nothing triggered a reconnect on signaling-WS loss; with the prior commit on this branch finally driving into `ReconnectionManager`, the latent bug surfaces. Drop the spurious `.data` hop.
1 parent 8c880c5 commit 4bbf8c0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

getstream/video/rtc/reconnection.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,13 @@ async def _reconnect_fast(self):
209209
self.connection_manager._connection_options.fast_reconnect = True
210210
previous_ws_client = self.connection_manager.ws_client
211211

212-
# Use _connect_internal with existing connection info
212+
# Use _connect_internal with existing connection info.
213+
# `self.join_response` is already the unwrapped data payload
214+
# (see ConnectionManager._connect_internal: it stores
215+
# `join_response.data`), so credentials live at the top level.
213216
await self.connection_manager._connect_internal(
214217
region=self.connection_manager._connection_options.region,
215-
token=self.connection_manager.join_response.data.credentials.token
218+
token=self.connection_manager.join_response.credentials.token
216219
if self.connection_manager.join_response
217220
else None,
218221
session_id=self.connection_manager.session_id,

0 commit comments

Comments
 (0)