def reply.sent.close
bend-kit-http@0.38.4.0 · http.bend:5617
import bend-kit-http@0.38.4.0/http.bend as Http
import Base
import bend-kit-time@0.3.0.0/time.bend as Time
5617def reply.sent.close(m: Socket & Result<&1, &1, U32 & String, Unit>) -> IO(Unit):
5618 (s, r) = m
5619 match r:
5620 case Fail{e}:
5621 Socket.close(s)
5622 case Done{u}:
5623 do IO<Unit>:
5624 now : Time.Duration <- Time.mono()
5625 reply.drain(U32.to_nat(512), True{}, Time.Duration.add(now, Time.Duration.of_ms(2500)), (s, True{}))