def give.sent
import bend-kit-http@0.38.2.0/admission.bend as Admissionimport Base
305# Correct owners cannot retire the actor while a lease remains counted. If an
306# internal channel is externally closed, report the violation instead of joining
307# an unanswered reply or pretending a retained operation drained.
308def give.sent(sent: Result<&1, &1, Command, Unit>, +reply: Chan(Unit)) -> IO(Unit):
309 match sent:
310 case Fail{command}:
311 do IO<Unit>:
312 Chan.close(Unit, reply)
313 IO.die(Unit, 1, "Admission.give: controller closed while lease retained")
314 case Done{u}:
315 IO.join(Unit, reply)