diff options
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 16 |
2 files changed, 15 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 182aaaa9a8..4c56751780 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,9 @@ Line wrap the file at 100 chars. Th - Migrate split tunneling view to compose. ### Fixed +- Update relay list after logging in. Previously, if the user wasn't logged in when the daemon + started, the relay list would only be updated after attempting to connect to the VPN. + #### Android - Fix connection header flickering. diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index 28b33c908d..946c10a1f8 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -1358,12 +1358,20 @@ where fn on_login_account(&mut self, tx: ResponseTx<(), Error>, account_token: String) { let account_manager = self.account_manager.clone(); + let availability = self.api_runtime.availability_handle(); tokio::spawn(async move { let result = async { - account_manager.login(account_token).await.map_err(|error| { - log::error!("{}", error.display_chain_with_msg("Login failed")); - Error::LoginError(error) - }) + account_manager + .login(account_token) + .await + .map_err(|error| { + log::error!("{}", error.display_chain_with_msg("Login failed")); + Error::LoginError(error) + })?; + + availability.resume_background(); + + Ok(()) }; Self::oneshot_send(tx, result.await, "login_account response"); }); |
