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 | 0d537aa65fcb777cf11fb6c4c6ce8d2e75c1304c (patch) | |
| tree | e540a16e3746f8b5b529daa66c7e194618a662fb /src/transport/paths.rs | |
| parent | f8b10bdd4481edf2250293c39182436923fd2f89 (diff) | |
introduce per-transport sync reply timeout
Diffstat (limited to 'src/transport/paths.rs')
| -rw-r--r-- | src/transport/paths.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/transport/paths.rs b/src/transport/paths.rs index 8bb8533..1f88e0a 100644 --- a/src/transport/paths.rs +++ b/src/transport/paths.rs @@ -644,6 +644,16 @@ impl Paths { .unwrap_or_default() } + /// The longest of the transports' (`Transport::sync_reply_timeout`): an answer may + /// come over any of them. + pub(crate) fn sync_reply_timeout(&self) -> Duration { + self.links + .iter() + .map(|link| link.inner.sync_reply_timeout()) + .max() + .unwrap_or(crate::state::SYNC_REPLY_TIMEOUT) + } + /// Each transport's (`Transport::local_addresses`), with its scheme: taken in turns, /// each transport's first in the configured order, then each one's second, and so on, /// so a list cut short (`members::MAX_ADDRESSES`) still has every transport's best. |
