def pool.stream.close

bend-kit-http@0.38.5.0 · http.bend:4879

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

4879# stream.close, but a body read to its end and decoded cleanly gives its connection to the pool.
4880def pool.stream.close(p: Pool, st: Stream) -> IO(Pool):
4881  Stream{+tls, s, ms, res, +rb, out, decs, back} = st
4882  do IO<Pool>:
4883    good : Bool <- stream.finish(decs)
4884    stream.give(Bool.and(good, Bool.and(stream.po.end(out), stream.rb.done(rb))), back, p, tls, s)

Uses (10)

Used by (2)