Files
piik/prototype
T
AAA edadc6aa06 fix(native): supervise the transport runtime from its Driver
The transport pump's lifetime had no owner beyond its happy path. The
ServerUdp lease was a bare flag reset only after the pump loop ended
normally, so a panicked or aborted pump left the fixed sockets leased
forever and every later Runtime on that service returned at once, failing
each call with "transport closed". Nothing above noticed: the Driver only
saw per-call errors, failed pairs one by one, and replanned into the same
failure. Runtime had no Drop either, and its engines hold command senders,
so a Runtime dropped by a panicking Driver kept its pump, sockets and
readers alive.

The lease is now an RAII guard owned by the pump task, so return, panic
and abort all release it, and the flag is private to server_udp.rs.
Runtime aborts its task on Drop, and each socket reader is aborted with
the Socket that owns it, so an idle reader no longer holds its port after
an aborted pump. Runtime::stopped resolves when the command receiver,
owned only by the pump task, is dropped; the Driver's main select ends
the Driver with an error on it. Retirement still runs once through
Driver::close on every exit, and a clean close stops the runtime only
after the loop, so it is not reported as a failure.
edadc6aa06 · 2026-11-24 21:16:01 +08:00
History
..