fix(rtc): correct join_response attribute access in FAST reconnect#242
Conversation
`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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR corrects the authentication token source in the fast reconnection flow. The ChangesFast Reconnection Token Source Correction
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
ConnectionManager._connect_internalstoresjoin_response.dataasself.join_response, so credentials live at the top level._reconnect_fastwas readingself.join_response.data.credentials.token, which raisesAttributeError: 'JoinCallResponse' object has no attribute 'data'the first time a FAST reconnect actually runs.This codepath was never exercised in production because nothing triggered a reconnect on signaling-WS loss. With #241 finally driving into
ReconnectionManager, this latent bug surfaces and would crash the first FAST attempt — so it needs to land before (or together with) that PR.Changes
.datahop inReconnectionManager._reconnect_fast(getstream/video/rtc/reconnection.py).Related: #241
Summary by CodeRabbit