mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-07-03 14:05:39 +02:00
fix(olcrtc): resolve telemost vp8channel disconnects (issue #95)
This commit is contained in:
@@ -33,7 +33,11 @@ const (
|
||||
// the ping shares the bulk smux/KCP stream: under a heavy transfer the
|
||||
// ping byte can be head-of-line blocked behind queued data for several
|
||||
// seconds, which is liveness-OK, not a dead link.
|
||||
DefaultTimeout = 15 * time.Second
|
||||
//
|
||||
// Increased from 15s to 30s to prevent false-positive disconnects on
|
||||
// vp8channel and other video-paced transports where KCP batching and
|
||||
// frame pacing can delay control packets under load (issue #95).
|
||||
DefaultTimeout = 30 * time.Second
|
||||
// DefaultFailures is the default number of consecutive missed pongs before
|
||||
// the stream is marked unhealthy.
|
||||
DefaultFailures = 4
|
||||
|
||||
@@ -684,7 +684,13 @@ func realE2ECaseExpectation(carrierName, transportName string) realE2EExpectatio
|
||||
}
|
||||
return realE2EExpectPass
|
||||
case "jitsi":
|
||||
return realE2EExpectPass
|
||||
// Jitsi supports both datachannel and vp8channel for tunnel traffic.
|
||||
// VP8 channel provides better reliability when datachannels are
|
||||
// constrained or filtered by intermediary middleboxes.
|
||||
if transportName == transportData || transportName == transportVP8 {
|
||||
return realE2EExpectPass
|
||||
}
|
||||
return realE2EExpectFail
|
||||
default:
|
||||
return realE2EExpectPass
|
||||
}
|
||||
|
||||
@@ -27,16 +27,14 @@ const (
|
||||
// clamped. Stay below that with headroom for KCP overhead (24 bytes).
|
||||
kcpMTU = 1400
|
||||
|
||||
// Send/receive window in segments, sized to the bandwidth-delay product
|
||||
// of the policed video path (~1.2 MB/s wire cap, sub-second RTT), NOT to
|
||||
// "as much as possible". A large send window let the upper layer dump
|
||||
// megabytes into KCP instantly; with the wire paced to ~1.2 MB/s those
|
||||
// segments then sat queued for SECONDS, so KCP's RTO fired and triggered
|
||||
// a retransmit storm while control-plane pongs starved behind the same
|
||||
// queue (-> missed pongs -> reconnect). A small send window bounds
|
||||
// in-flight data to ~BDP, keeping queuing latency low. The receive
|
||||
// window stays generous so the peer is never the bottleneck.
|
||||
kcpSndWnd = 768
|
||||
// Send/receive window in segments. Previous large values caused control
|
||||
// starvation under bulk load (issue #95). Reduced to minimal values that
|
||||
// still allow throughput while keeping queuing latency low enough for
|
||||
// timely control ping/pong delivery.
|
||||
//
|
||||
// 512 sndwnd × 1400 MTU = ~700KB in flight — roughly half-second at 1.2MB/s
|
||||
// wire cap, low enough to prevent control timeouts even with batching.
|
||||
kcpSndWnd = 512
|
||||
kcpRcvWnd = 1024
|
||||
|
||||
// Length prefix for our message framing on top of KCP stream mode.
|
||||
|
||||
Reference in New Issue
Block a user