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
commit540a344b811885551ad5ed374e0abe3411554b9d (patch)
treef5f4e300a1b69f51fba7b7c8fd91ac5ee3932e25 /src/remake/switch.rs
parent00f770d985e6ad1294746d4f1c1d72d3d7170d23 (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;
}