Files
piik/prototype
T
AAA 3b6d9450c3 refactor(app): one request and reply to the room host
Nineteen places made a oneshot, sent a HostCommand that carries its
sender, awaited the answer and mapped a host that had gone away to
hosting_unavailable, each by hand. session::request, beside
HostCommand, does it once. It takes the queue slot the caller reserved
and sends at once, then returns the wait for the answer, so what
differs between callers stays visible where they call: reserve or
try_reserve, a deadline around the answer only, an abort around the
whole, a handoff made under the hub's lock.

Kept at their sites, as they were: hosted creation and a copy reserve
without waiting and treat a full queue as busy or unavailable; a
creation or a restore whose answer is lost after the handoff is
unconfirmed, not unavailable; the relay capacity deadline starts after
the handoff and the connection metrics deadline covers the wait for
the queue too; a capture's video settings are read before waiting for
the queue.

Three sites change, in one way: RelayCapacity, ConnectionMetrics and
RegisterWatchReader reported the channel library's own "channel
closed" when the host dropped their answer, and report
hosting_unavailable now, the code each already used when the queue
was closed before the handoff.

Tests: the helper before and after the handoff; the relay and metrics
replies on the control connection; a reader registration whose answer
is lost, which is refused as hosting_unavailable, revoked, and can be
prepared again.
3b6d9450c3 · 2026-11-29 19:14:26 +08:00
History
..