Skip to content

fix(ice): dispatch passive tcp candidates from non-trickle sdp - #956

Open
Speedyzyzz wants to merge 1 commit into
webrtc-rs:masterfrom
Speedyzyzz:fix/ice-tcp-sdp-passive-candidates
Open

Speedyzyzz wants to merge 1 commit into
webrtc-rs:masterfrom
Speedyzyzz:fix/ice-tcp-sdp-passive-candidates

Conversation

@Speedyzyzz

Copy link
Copy Markdown

Description

When establishing an active-passive ICE-TCP connection using non-trickle SDP (common with WHIP ingest servers), remote passive TCP candidates arrive embedded directly inside the SDP passed to set_remote_description() rather than via subsequent add_ice_candidate() calls.

Currently, RTCPeerConnectionDriver only dials remote passive TCP candidates when it receives PeerConnectionDriverEvent::RemoteIceTcpPassiveCandidate. Because only add_ice_candidate() emitted that event, non-trickle peers never dialed the passive TCP endpoint and remained stuck in RTCIceConnectionState::Checking.

This patch inspects the parsed media descriptions in set_remote_description() and dispatches RemoteIceTcpPassiveCandidate for any passive TCP candidates present in the SDP.

Testing

  • Added an integration test (test_ice_tcp_non_trickle_sdp_passive_dial in tests/ice_test.rs) verifying that an active peer dials a passive TCP peer when candidates are exchanged solely through SDP offer/answer.
  • Ran cargo test and cargo clippy --all-targets.

Closes #920

Copilot AI balanced review requested due to automatic review settings November 9, 2026 10:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Active ICE-TCP never dials passive candidates that arrived in the SDP (non-trickle)

2 participants