Skip to main content

catch_up

Function catch_up 

Source
async fn catch_up(
    state: &TransportState,
    slot: &SessionSlot,
    want: u64,
) -> Result<(), NotReady>
Expand description

Bring slot’s held conversation up to want, or report that it cannot.

One requirement: the copy an answer carries must hold every frame numbered at or below want. The fold loop consumes the fanout in a task of its own, so a frame minted before the counter was read can reach the copy after it - waited on here, briefly. When the wait runs out the frames come from the seat’s own window instead, which the fanout feeds directly (every frame, subscriber or not) under its two ceilings - a frame count and a byte budget, so a heavy seat’s window holds fewer than the cap. Only a gap wider than that window is refused, loudly and by name: a stuck fold is forge’s problem, and an answer that pretended otherwise is a row lost in silence.