Skip to main content

wait_connected

Function wait_connected 

Source
pub async fn wait_connected(relay: &Relay, allowance: Duration) -> bool
Expand description

Interpret a relay.sync error. Some(false) = the relay cannot reconcile: either the SDK recognized the refusal outright, or a relay that was CONNECTED stayed silent past the initial timeout — healthy negentropy implementations answer the first frame in well under a second, so silence on a live connection is the no-implementation signature. A timeout on a relay that wasn’t connected is an outage and classifies as nothing. Wait briefly for a relay to reach Connected before a sync attempt. false = never connected inside the allowance — callers treat that as a TRANSIENT skip (no verdict, no skip-list, no cursor touch): an unreachable relay must cost the allowance, not a full negentropy initial_timeout. The Monitor-driven reconnect catch-up covers it the moment it truly connects.