aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-01 21:01:43 +0100
committertv <tv@krebsco.de>2026-11-01 21:01:43 +0100
commitee8ce39bf3901786d3767cf2d690ba1d73a369ae (patch)
tree237519074f84dacd54a979cbd780dfcf127d178b /src/transport/mod.rs
parent13b1061ee221a03168ba99f311e56d0896ef319b (diff)
introduce per-transport sync reply timeout
Diffstat (limited to 'src/transport/mod.rs')
-rw-r--r--src/transport/mod.rs7
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).