Skip to main content

dm_attempt_timeout

Function dm_attempt_timeout 

Source
pub fn dm_attempt_timeout(peer_rtt_ms: Option<u32>) -> Duration
Expand description

Compute an adaptive per-attempt DM timeout from a smoothed peer RTT.

Unknown or zero RTT falls back to a conservative network-wide P95 estimate. The result is clamped so fast peers fail quickly while slow or unhealthy peers cannot pin an API request forever.