pub fn body_holding(
body: BoxBody<Bytes, Box<dyn Error + Send + Sync>>,
guards: Vec<Box<dyn Send + 'static>>,
) -> BoxBody<Bytes, Box<dyn Error + Send + Sync>>Expand description
Wraps body so guards are dropped only when the body reports it has
finished (cleanly or with an error) or the returned body is itself
dropped — never merely because the node that started the stream returned.
This is what keeps balancer in-flight counters and limit-conn permits
held for the stream’s real lifetime.