summaryrefslogtreecommitdiffstats
path: root/src/remake/switch.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-21 14:38:49 +0200
committertv <tv@krebsco.de>2026-10-21 14:38:49 +0200
commit8891ebd88f87ff93c1efab51d0b9373f845a1dee (patch)
treeba24dd7b2195b805839ebfbb2d34baa1f2bb7fd0 /src/remake/switch.rs
parentefb0c68e0be6413636a3509e550d187447de408d (diff)
make remake switch delay configurable
Diffstat (limited to 'src/remake/switch.rs')
-rw-r--r--src/remake/switch.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/remake/switch.rs b/src/remake/switch.rs
index 4eb72b0..f4a018a 100644
--- a/src/remake/switch.rs
+++ b/src/remake/switch.rs
@@ -111,7 +111,12 @@ async fn check<H: Host>(host: &H) {
return catchup::check(host).await;
}
- let switch_delay = host.dormant_after() / 4; // one keepalive interval
+ // As proposed, or one keepalive interval.
+ let switch_delay = record
+ .proposal
+ .switch_delay_ms
+ .map(Duration::from_millis)
+ .unwrap_or(host.dormant_after() / 4);
if host.remake().first_seen(&id).elapsed() < switch_delay {
return;
}