Skip to main content

DRAIN_TIMEOUT

Constant DRAIN_TIMEOUT 

Source
pub const DRAIN_TIMEOUT: Duration;
Expand description

Upper bound on how long graceful shutdown waits for in-flight streams to drain before forcing teardown. With REQUEST_READ_TIMEOUT bounding each read, well-behaved drains finish quickly; this is a backstop so a wedged processor or transport can’t hang shutdown forever (#159).

Must exceed REQUEST_READ_TIMEOUT (30 s) so in-flight requests can finish before the connection tears down. The 10 s margin is intentional.