summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--mullvad-daemon/src/device/mod.rs12
2 files changed, 7 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a2cc74687..40d56e949f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -40,6 +40,7 @@ Line wrap the file at 100 chars. Th
### Fixed
- Fix location search in desktop app only searching for English location names.
+- Fix automatic WireGuard key rotation not being initialized correctly when not running the GUI.
#### Android
- Fix adaptive app icon which previously had a displaced nose and some other oddities.
diff --git a/mullvad-daemon/src/device/mod.rs b/mullvad-daemon/src/device/mod.rs
index b2b9976501..22a073738d 100644
--- a/mullvad-daemon/src/device/mod.rs
+++ b/mullvad-daemon/src/device/mod.rs
@@ -448,6 +448,12 @@ impl AccountManager {
let mut current_api_call = api::CurrentApiCall::new();
loop {
+ if current_api_call.is_idle() {
+ if let Some(timed_rotation) = self.spawn_timed_key_rotation() {
+ current_api_call.set_timed_rotation(Box::pin(timed_rotation))
+ }
+ }
+
futures::select! {
api_result = current_api_call => {
self.consume_api_result(api_result, &mut current_api_call).await;
@@ -523,12 +529,6 @@ impl AccountManager {
}
}
}
-
- if current_api_call.is_idle() {
- if let Some(timed_rotation) = self.spawn_timed_key_rotation() {
- current_api_call.set_timed_rotation(Box::pin(timed_rotation))
- }
- }
}
self.shutdown().await;
if let Some(tx) = shutdown_tx {