diff options
| author | tv <tv@krebsco.de> | 2026-11-01 21:01:43 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-01 21:01:43 +0100 |
| commit | 9edf5e5d56596458c9f8faf289cc5328aef08226 (patch) | |
| tree | e1809beca905767d9d82ba4d5569a2925f9cbb2f /src/transport/mod.rs | |
| parent | da18be3c9bbfdd5b3b4ff19f48863a7badf6074d (diff) | |
introduce per-transport sync reply timeout
Diffstat (limited to 'src/transport/mod.rs')
| -rw-r--r-- | src/transport/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs index a802269..1de0633 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -768,6 +768,13 @@ pub(crate) trait Transport: Send + Sync { /// a message sent is delivered or lost for good. fn delivery_limit(&self) -> std::time::Duration; + /// The first wait for an answer to a sync message (`Timing::sync_reply_timeout`): by + /// default `SYNC_REPLY_TIMEOUT`, longer on a transport whose round trips take + /// seconds. + fn sync_reply_timeout(&self) -> std::time::Duration { + crate::state::SYNC_REPLY_TIMEOUT + } + /// Where this node can be reached, as addresses other nodes can use: published in /// the member list (`swarm::members`). By default its identity, for a transport /// whose identities are addresses (Mycelium: a public key). |
