summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mullvad-daemon/src/wireguard.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/mullvad-daemon/src/wireguard.rs b/mullvad-daemon/src/wireguard.rs
index 9d6d25947f..0939a0afac 100644
--- a/mullvad-daemon/src/wireguard.rs
+++ b/mullvad-daemon/src/wireguard.rs
@@ -21,12 +21,11 @@ pub use talpid_types::net::wireguard::{
use talpid_types::ErrorExt;
/// Default automatic key rotation
-#[cfg(not(target_os = "android"))]
-const DEFAULT_AUTOMATIC_KEY_ROTATION: Duration = Duration::from_secs(7 * 24 * 60 * 60);
-/// Default automatic key rotation
-#[cfg(target_os = "android")]
-const DEFAULT_AUTOMATIC_KEY_ROTATION: Duration = Duration::from_secs(4 * 24 * 60 * 60);
-
+const DEFAULT_AUTOMATIC_KEY_ROTATION: Duration = if cfg!(target_os = "android") {
+ Duration::from_secs(4 * 24 * 60 * 60)
+} else {
+ 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.