aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/sync.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-04 22:15:34 +0100
committertv <tv@krebsco.de>2026-11-04 22:15:34 +0100
commitf137a43b44684959a5e1de1f1e54566d8995926f (patch)
tree8fa18b5cffda453d691648bf408b1a626f81ecda /src/swarm/sync.rs
parenta1585a3db53ee59fe941622d698638322b585267 (diff)
throughput from delivered message
Diffstat (limited to 'src/swarm/sync.rs')
-rw-r--r--src/swarm/sync.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs
index a9d98b0..de2d86d 100644
--- a/src/swarm/sync.rs
+++ b/src/swarm/sync.rs
@@ -440,6 +440,15 @@ pub(crate) async fn handle_sync(
throughput
.lock_or_recover()
.exchange(&peer, wait.started, arrived, rtt);
+ } else if let Some(delay_ms) = hop_delay.filter(|ms| *ms > 0) {
+ // Nothing awaited: as long as it took to come.
+ throughput.lock_or_recover().message(
+ &peer,
+ payload_len as u64,
+ std::time::Duration::from_millis(delay_ms as u64),
+ arrived.0,
+ rtt,
+ );
}
peer_state.sync.reply_settled();