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
commit0d537aa65fcb777cf11fb6c4c6ce8d2e75c1304c (patch)
treee540a16e3746f8b5b529daa66c7e194618a662fb /src/transport/mod.rs
parentf8b10bdd4481edf2250293c39182436923fd2f89 (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).