diff options
Diffstat (limited to 'src/remake/switch.rs')
| -rw-r--r-- | src/remake/switch.rs | 7 |
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; } |
