Skip to main content

DEFAULT_INITIAL_RTT_MS

Constant DEFAULT_INITIAL_RTT_MS 

Source
pub const DEFAULT_INITIAL_RTT_MS: u64 = 333;
Expand description

Default round-trip time assumed before the first measurement, in milliseconds.

quinn’s own default, straight from RFC 9002’s kInitialRtt. It seeds the loss-recovery timers during the handshake, when no RTT sample exists yet: a lost handshake packet waits roughly three times this value before it is resent. On a path whose RTT is known (the rtt_ms field in the connection logs), 1.5–2x that measurement recovers a lost handshake in a fraction of the default wait. The margin is not optional: a value below the real RTT makes the timer fire early and retransmit packets that were never lost.