From 692113c87e476c2e8a82a7cdb9aa98354abc11fc Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sun, 6 Sep 2026 09:50:25 +0800 Subject: [PATCH] bump webrtc: probe on T3-rtx, settle the rest by the SACK, RTO from the latest send Sending without a congestion window, a T3-rtx resent everything in flight, and on a 5 Mbps link with 300-500ms stalls that spiralled: seconds of latency and several times the bytes. The fork now resends everything outstanding on a timeout only when it packs into four packets; otherwise it resends one packet and withholds the rest until the SACKs settle them (RFC 4960 6.3.3 E3, F-RTO): an original acked takes the marks off, a first transmission made after the timeout acked with the rest still missing sends them, and with nothing else to tell, a probe acked no sooner than the least RTT after it went out draws the next probe, two of them settling the rest as lost. A restarted RTO is counted from the latest send as QUIC does, backs off from the full RTO, and floors at KCP's 30ms with srtt + 25ms at the least. Lost tails of up to four packets and sparse small messages under loss now recover at KCP's pace where they trailed it by a frame; a stall no longer resends the backlog behind itself. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns --- Cargo.lock | 4 ++-- Cargo.toml | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 98840e947..902036cb3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9708,7 +9708,7 @@ dependencies = [ [[package]] name = "webrtc-sctp" version = "0.12.0" -source = "git+https://github.com/rustdesk-org/webrtc?rev=48100bf13e694d7e5bbb49b9a753dbad1c359d0c#48100bf13e694d7e5bbb49b9a753dbad1c359d0c" +source = "git+https://github.com/rustdesk-org/webrtc?rev=b221f13b1d6f21fbce09f9f63096be27dd392265#b221f13b1d6f21fbce09f9f63096be27dd392265" dependencies = [ "arc-swap", "async-trait", @@ -9748,7 +9748,7 @@ dependencies = [ [[package]] name = "webrtc-util" version = "0.11.0" -source = "git+https://github.com/rustdesk-org/webrtc?rev=48100bf13e694d7e5bbb49b9a753dbad1c359d0c#48100bf13e694d7e5bbb49b9a753dbad1c359d0c" +source = "git+https://github.com/rustdesk-org/webrtc?rev=b221f13b1d6f21fbce09f9f63096be27dd392265#b221f13b1d6f21fbce09f9f63096be27dd392265" dependencies = [ "async-trait", "bitflags 1.3.2", diff --git a/Cargo.toml b/Cargo.toml index 980723873..0894163b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -224,10 +224,13 @@ libxdo-sys = { path = "libs/libxdo-sys-stub" } # a congestion window, as KCP does - on by default, `allow-webrtc-congestion-control` opts back in. # Sending that way, a reordering window keeps a chunk that is merely late from being resent on a # path that jitters, every DATA chunk asks for its SACK at once so a lost tail is back within an -# RTT at KCP's RTO floors, and bundles of small chunks stay within the MTU. +# RTT at KCP's RTO floors, and bundles of small chunks stay within the MTU. A T3-rtx resends +# everything outstanding when it packs into four packets and otherwise probes with one and lets +# the SACK settle the rest (F-RTO), timed from the latest send, so a stall no longer resends the +# whole backlog behind itself while a short lost tail still comes back at once. # Pinned by rev, not branch: a fork branch can be rewritten out from under the lockfile. -webrtc-util = { git = "https://github.com/rustdesk-org/webrtc", rev = "48100bf13e694d7e5bbb49b9a753dbad1c359d0c" } -webrtc-sctp = { git = "https://github.com/rustdesk-org/webrtc", rev = "48100bf13e694d7e5bbb49b9a753dbad1c359d0c" } +webrtc-util = { git = "https://github.com/rustdesk-org/webrtc", rev = "b221f13b1d6f21fbce09f9f63096be27dd392265" } +webrtc-sctp = { git = "https://github.com/rustdesk-org/webrtc", rev = "b221f13b1d6f21fbce09f9f63096be27dd392265" } [package.metadata.winres] LegalCopyright = "Copyright © 2026 Purslane Tech Pte. Ltd. All rights reserved."