Skip to content

Fix "SCTP failed" if no DataChannel is created on a Transport with enableSctp: true#1749

Merged
ibc merged 6 commits intov3from
fix-issue-1748
Mar 13, 2026
Merged

Fix "SCTP failed" if no DataChannel is created on a Transport with enableSctp: true#1749
ibc merged 6 commits intov3from
fix-issue-1748

Conversation

@ibc
Copy link
Member

@ibc ibc commented Mar 12, 2026

Details

@ibc ibc requested a review from jmillan March 12, 2026 20:00
@ibc
Copy link
Member Author

ibc commented Mar 13, 2026

Some comments before I enter into details:

  • "transport connected" doesn't mean that transport.connect() was called. In a WebRtcTransport it means that DTLS is connected. In a PlanTransport it is always true from the beginning. Please see in Transport.cpp and WebRtcTransport.cpp when TransportConnected() is called.
  • We need "sctpDataReceived" because the transport may receive SCTP data (INIT chunk) before the DataProducer/Consumer request arrives to the worker (typical race condition between signaling and media) so we optimize it as follows: if SCTP data is received it means that the peer has enabled DataChannel so we allow such a received INIT chunk and start connecting our side. Otherwise the received SCTP INIT chunk could be ignored, so peer would resend it after some time etc.

Co-authored-by: José Luis Millán <jmillan@aliax.net>
@ibc ibc merged commit a8ceaaf into v3 Mar 13, 2026
25 of 48 checks passed
@ibc ibc deleted the fix-issue-1748 branch March 13, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

If a Transport is created with enableSctp: true and no DataChannel is created, after ~4 minutes it emits sctpstatechange with state "failed"

2 participants