Expand description
Structured lifecycle reason helpers.
Transport libraries still surface close reasons as debug strings in several places, but runtime policy should branch on reason codes rather than ad-hoc substring checks scattered through the codebase.
Enums§
Constants§
- REASON_
APP_ BACKGROUNDED - REASON_
AUTO_ CONNECT_ FAILURE - REASON_
CLOSED - REASON_
CONNECTION_ FAILED_ STABILITY - REASON_
DESIRED_ PEER_ WITHDRAWN - The authoritative coordination roster removed this peer. This is a terminal close for the current session, but it is not a user/manual disconnect and must not suppress a later fresh admission.
- REASON_
DISCONNECTED_ BY_ USER - REASON_
DUPLICATE_ ACCEPT_ SUPERSEDED - REASON_
DUPLICATE_ DIAL_ SUPERSEDED - REASON_
DUPLICATE_ KEPT_ EXISTING - REASON_
ENDPOINT_ HARD_ RESET_ REDIAL - REASON_
INCOMING_ TRANSPORT_ CLOSED_ WITHOUT_ LIVE_ REPLACEMENT - REASON_
MANUAL_ DISCONNECT - REASON_
NATIVE_ CUSTOM_ TRANSPORT_ UPGRADE - The native node emits this when an authenticated transport-upgrade control exchange replaces the current Iroh leg with a selected custom transport. The old leg’s close is expected replacement churn, not a terminal loss.
- REASON_
NETWORK_ CHANGE_ RECONNECT - REASON_
REMOTE_ MANUAL_ DISCONNECT - REASON_
REPLACED_ BY_ FRESH_ INCOMING - REASON_
REPLACED_ BY_ NEW_ INBOUND - REASON_
REPLACED_ BY_ NEW_ OUTBOUND - Emitted by
native_node::connect/connect_addrwhen a fresh outbound dial replaces an earlier connection to the same endpoint (mirror ofREASON_REPLACED_BY_NEW_INBOUNDfor the dialer side). Must be classified as replacement churn — without it, glare resolution retires the kept transport withincoming-transport-closed-without-live-replacementeven though a fresher replacement is already adopted. - REASON_
REPLACEMENT_ IN_ PROGRESS - REASON_
REPLACEMENT_ PEER_ ADMITTED - REASON_
RETIRED_ CONFLICTING_ RECORD - REASON_
SESSION_ ADMISSION_ REJECTED - REASON_
SESSION_ TOKEN_ REVOKED - REASON_
STALE_ ACTIVE_ CONNECTION_ RECONNECT - REASON_
STALE_ SETTLED_ PEER_ SNAPSHOT - REASON_
ZOMBIE_ REPLACED_ BY_ FRESH_ ACCEPT - REASON_
ZOMBIE_ REPLACED_ BY_ FRESH_ DIAL