aboutsummaryrefslogtreecommitdiffstats
path: root/src/state/timing.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/timing.rs')
-rw-r--r--src/state/timing.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state/timing.rs b/src/state/timing.rs
index af5c0c0..fed48e9 100644
--- a/src/state/timing.rs
+++ b/src/state/timing.rs
@@ -35,6 +35,11 @@ pub(crate) struct Timing {
/// First wait for an answer to a sync message before sending again; doubles while
/// answers stay out (`SyncSession::reply_backoff`).
pub(crate) sync_reply_timeout: Duration,
+ /// How long what we sent a peer may go unanswered, with nothing else heard from it,
+ /// before we don't count it as reached (`swarm::reach`, `PeerState::answer_overdue`):
+ /// twice the first sync reply timeout, so one lost message (or its answer) doesn't
+ /// do it.
+ pub(crate) unreached_after: Duration,
/// How long the transport tries to deliver a message before dropping it
/// (`Transport::delivery_limit`): a peer silent for longer has nothing on the way to
/// us any more.
@@ -93,6 +98,7 @@ impl Timing {
// Only the source gets these, and only while catching up.
catch_up_probe: (keepalive / 30).clamp(Duration::from_secs(1), Duration::from_secs(5)),
sync_reply_timeout,
+ unreached_after: sync_reply_timeout * 2,
delivery_limit,
}
}