diff options
| author | tv <tv@krebsco.de> | 2026-11-03 08:34:09 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-03 08:34:09 +0100 |
| commit | 2a85e21ab81d4497dcc5680b4348bbf802866944 (patch) | |
| tree | e360bfbddb976f0c1ec9b445439bcb03dc264519 /src/state/timing.rs | |
| parent | 68e1db7f15d8e932be67c04d27dc57c3bb17b53b (diff) | |
unanswered members not reached
Diffstat (limited to 'src/state/timing.rs')
| -rw-r--r-- | src/state/timing.rs | 6 |
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, } } |
