Skip to content

Commit

Permalink
Fix(dcsctp): Allow unlimited sctp retransmissions with dcsctp.
Browse files Browse the repository at this point in the history
Don't considerstreams reset a "Suprising" SCTP callback.
  • Loading branch information
JonathanLennox committed Jun 17, 2024
1 parent 93c41cc commit bf090cc
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit bf090cc

Please sign in to comment.