From af2ff245f7cca5d923350a49882e71cf09d52445 Mon Sep 17 00:00:00 2001 From: Jonathan Lennox Date: Mon, 17 Jun 2024 16:01:26 -0400 Subject: [PATCH] Fix(dcsctp): Allow unlimited sctp retransmissions with dcsctp. (#2180) Don't consider streams reset a "Surprising" SCTP callback. --- .../org/jitsi/videobridge/dcsctp/DcSctpTransport.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jvb/src/main/kotlin/org/jitsi/videobridge/dcsctp/DcSctpTransport.kt b/jvb/src/main/kotlin/org/jitsi/videobridge/dcsctp/DcSctpTransport.kt index a048c465a3..8269c5c76a 100644 --- a/jvb/src/main/kotlin/org/jitsi/videobridge/dcsctp/DcSctpTransport.kt +++ b/jvb/src/main/kotlin/org/jitsi/videobridge/dcsctp/DcSctpTransport.kt @@ -86,6 +86,11 @@ class DcSctpTransport( check(SctpConfig.config.enabled()) { "SCTP is disabled in configuration" } DcSctpOptions().apply { maxTimerBackoffDuration = DEFAULT_MAX_TIMER_DURATION + // Because we're making retransmits faster, we need to allow unlimited retransmits + // or SCTP can time out (which we don't handle). Peer connection timeouts are handled at + // a higher layer. + maxRetransmissions = null + maxInitRetransmits = null } } @@ -127,7 +132,9 @@ abstract class DcSctpBaseCallbacks( } override fun OnStreamsResetPerformed(outgoingStreams: ShortArray) { - transport.logger.info("Surprising SCTP callback: outgoing streams ${outgoingStreams.joinToString()} reset") + // This is normal following a call to close(), which is a hard-close (as opposed to shutdown() which is + // soft-close) + transport.logger.info("Outgoing streams ${outgoingStreams.joinToString()} reset") } override fun OnIncomingStreamsReset(incomingStreams: ShortArray) {