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
commitb9782f827229b9e3e6053e065229cfef0e7983c3 (patch)
treee1320fcbf7eca0e8bc41a28f619c182f15b51e61 /src/remake/switch.rs
parentf85728a72eb756c9e260c6afbdfab961ed414566 (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 a5031fc..2670f14 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;
}