Skip to main content

DRAFT_SETTLE_WINDOW

Constant DRAFT_SETTLE_WINDOW 

Source
const DRAFT_SETTLE_WINDOW: Duration;
Expand description

How long a task that needs the session’s draft waits for the control stream to name one before running on the draft the session started with.

The wait exists for one race, and the race is a small one. Drafts 07 to 14 all negotiate the same ALPN, so those sessions start on a configured guess and learn the real answer from CLIENT_SETUP — which every draft in that cohort puts first on the wire, ahead of the subscription exchange any data stream comes out of. So the bytes that settle the draft have already arrived by the time a data stream exists, and what is left to wait for is one task being polled rather than a round trip. The window is sized well above that and is not a latency budget: it is the point at which the session stops believing a SETUP is coming.

It has to end, because a peer that opens a data stream having sent no SETUP at all is not a session any draft describes, and such a session still has to run rather than stall. When the window expires the session settles on the draft it started with — at the lowest DraftSource rank, so a SETUP that turns up afterwards still refines the streams that come after it.

A session with no control stream at all never reaches the window; see SessionDraft::control_stream_open.