diff options
| author | Jonathan <jonathan@mullvad.net> | 2023-03-30 10:02:18 +0200 |
|---|---|---|
| committer | Jonathan <jonathan@mullvad.net> | 2023-03-30 10:02:18 +0200 |
| commit | 6a884cefdb78fa7cb34f51f2605a356b0db3e97f (patch) | |
| tree | 0a72b9de6c7f6d2b9f4a725a103ff6aa6ea24730 | |
| parent | d630325c55920cb4c294812e40221fea7e6d7510 (diff) | |
| parent | 73e912ea5df3dc5109eba3e1ce66871db7f763db (diff) | |
| download | mullvadvpn-6a884cefdb78fa7cb34f51f2605a356b0db3e97f.tar.xz mullvadvpn-6a884cefdb78fa7cb34f51f2605a356b0db3e97f.zip | |
Merge branch 'account-manager-key-rotation-bug'
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | mullvad-daemon/src/device/mod.rs | 12 |
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 { |
