Skip to main content

STALE_AFTER

Constant STALE_AFTER 

Source
pub const STALE_AFTER: Duration;
Expand description

How long a WS-shim session must be without a live client before DEL. Sized to survive a WHOLE-FLEET reconnect after a daemon restart: on restart every session replays from disk carrying a stale client_id, and the in-memory disconnected_since map is empty, so all sessions enter the grace at once. Too short and a slow-to-redial shim gets reaped — cascading its UNREAD direct messages away (belongs_to(Session), review R5) — before it reconnects to read them. 60s gives the fleet room to re-dial; a genuinely dead session just lingers that long (and the roster’s liveness fields show it going stale).