summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2020-09-24 11:33:04 +0100
committerEmīls <emils@mullvad.net>2020-09-25 17:23:07 +0100
commit081440f2d315f86ef535496e87866c40d19499dc (patch)
treea8d5eab370caf9bf3b5fa927560bdc41da54f938
parent95f42916c7d63ae1816bf53d69288fd68e11fa95 (diff)
downloadmullvadvpn-081440f2d315f86ef535496e87866c40d19499dc.tar.xz
mullvadvpn-081440f2d315f86ef535496e87866c40d19499dc.zip
Decrease key rotation start delay to 3 minutes
-rw-r--r--mullvad-daemon/src/wireguard.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/mullvad-daemon/src/wireguard.rs b/mullvad-daemon/src/wireguard.rs
index 189d1f5a6a..b364a71a3a 100644
--- a/mullvad-daemon/src/wireguard.rs
+++ b/mullvad-daemon/src/wireguard.rs
@@ -24,6 +24,8 @@ use talpid_types::ErrorExt;
const DEFAULT_AUTOMATIC_KEY_ROTATION: Duration = Duration::from_secs(7 * 24 * 60 * 60);
/// How long to wait before reattempting to rotate keys on failure
const AUTOMATIC_ROTATION_RETRY_DELAY: Duration = Duration::from_secs(60 * 15);
+/// How long to wait before starting the first key rotation.
+const ROTATION_START_DELAY: Duration = Duration::from_secs(60 * 3);
/// How often to check whether the key has expired.
/// A short interval is used in case the computer is ever suspended.
const KEY_CHECK_INTERVAL: Duration = Duration::from_secs(60);
@@ -337,7 +339,7 @@ impl KeyManager {
account_token: AccountToken,
) {
let mut interval = tokio::time::interval_at(
- (Instant::now() + AUTOMATIC_ROTATION_RETRY_DELAY).into(),
+ (Instant::now() + ROTATION_START_DELAY).into(),
AUTOMATIC_ROTATION_RETRY_DELAY,
);