def pool.take.live
import bend-kit-http@0.38.2.0/http.bend as Httpimport Base
3680# pool.take, but an idle connection that the peer closed, or an HTTP/1.1 socket with bytes waiting, is closed, and the next one is tried.
3681def pool.take.live(p: Pool, +key: String) -> IO(Pool & Maybe<&1, Conn>):
3682 Pool{+cap, idle} = p
3683 pool.take.go((2n * U32.to_nat(cap) + 2n : Nat), key, took.of(pool.take(Pool{cap, idle}, key)))