Skip to main content

backoff

Function backoff 

Source
pub fn backoff(attempt: u32) -> Duration
Expand description

How long to wait before asking the host again after attempt tries (0-based): 1 s, 2 s, 3 s, 5 s, 8 s, then every 10 s. Bounded so a bot that takes minutes costs a few dozen cheap calls, never a hammered host. GITPOULPI_FLOW_POLL_MS fixes the pause (tests and benches).