Skip to content

Commit af2ff24

Browse files
Fix(dcsctp): Allow unlimited sctp retransmissions with dcsctp. (#2180)
Don't consider streams reset a "Surprising" SCTP callback.
1 parent 93c41cc commit af2ff24

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

jvb/src/main/kotlin/org/jitsi/videobridge/dcsctp/DcSctpTransport.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ class DcSctpTransport(
8686
check(SctpConfig.config.enabled()) { "SCTP is disabled in configuration" }
8787
DcSctpOptions().apply {
8888
maxTimerBackoffDuration = DEFAULT_MAX_TIMER_DURATION
89+
// Because we're making retransmits faster, we need to allow unlimited retransmits
90+
// or SCTP can time out (which we don't handle). Peer connection timeouts are handled at
91+
// a higher layer.
92+
maxRetransmissions = null
93+
maxInitRetransmits = null
8994
}
9095
}
9196

@@ -127,7 +132,9 @@ abstract class DcSctpBaseCallbacks(
127132
}
128133

129134
override fun OnStreamsResetPerformed(outgoingStreams: ShortArray) {
130-
transport.logger.info("Surprising SCTP callback: outgoing streams ${outgoingStreams.joinToString()} reset")
135+
// This is normal following a call to close(), which is a hard-close (as opposed to shutdown() which is
136+
// soft-close)
137+
transport.logger.info("Outgoing streams ${outgoingStreams.joinToString()} reset")
131138
}
132139

133140
override fun OnIncomingStreamsReset(incomingStreams: ShortArray) {

0 commit comments

Comments
 (0)