def pool.keep.s

bend-kit-http@0.38.4.0 · http.bend:3541

import bend-kit-http@0.38.4.0/http.bend as Http
import Base

3541# A socket with bytes past the response is out of step with the server, so it is closed.
3542def pool.keep.s(p: Pool, +key: String, +tls: Bool, res: Res, s: Socket, clean: Bool) -> IO(Pool & Result<&1, &1, Err, Res>):
3543  match clean:
3544    case True{}:
3545      do IO<Pool & Result<&1, &1, Err, Res>>:
3546        p2 : Pool <- pool.give(p, key, Conn{tls, s})
3547        return (p2, Done{res})
3548    case False{}:
3549      do IO<Pool & Result<&1, &1, Err, Res>>:
3550        io.close(tls, s)
3551        return (p, Done{res})

Uses (16)

Used by (1)