Skip to content

Commit

Permalink
Fix(dcsctp): Allow unlimited sctp retransmissions with dcsctp. (#2180)
Browse files Browse the repository at this point in the history
Don't consider streams reset a "Surprising" SCTP callback.
  • Loading branch information
JonathanLennox authored Jun 17, 2024
1 parent 93c41cc commit af2ff24
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 af2ff24

Please sign in to comment.