Ensure connection state mismatches aren't triggered for ongoing PC connection attempts#1807
Ensure connection state mismatches aren't triggered for ongoing PC connection attempts#1807
Conversation
…nnection attempts
🦋 Changeset detectedLatest commit: 8b8b266 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughThe changes update the connection verification logic to recognize both CONNECTING and CONNECTED states as valid transport states, rather than only CONNECTED. A corresponding diagnostic log field is renamed to reflect this broader acceptance. A changeset entry documents the patch release. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2026-02-03T17:59:43.931ZApplied to files:
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting 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 |
size-limit report 📦
|
1egoman
left a comment
There was a problem hiding this comment.
Makes sense at a high level to me, though I haven't really had to dive too deeply into the RTCEngine yet so getting a 👍 from somebody more familiar could be a good idea.
we use STATE_MISMATCH today (additionally, unfortunately) for cases where the expected current connection state doesn’t reflect the connection state of the underlying engine (and thus from the webrtc peer connections). This can happen if the first publication of a track takes too long. In this time the expected connection state is connected but the peer connection transitions to connecting while establishing the connection.
This PR adds the
connectingstate to the possible values to verify the transport is working as expected to ensure only actual failures and mismatches and not intermediate states are used to trigger a connection state mismatch.Summary by CodeRabbit