diff options
| author | David Lönnhager <david.l@mullvad.net> | 2023-06-12 22:51:43 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2023-06-12 22:51:43 +0200 |
| commit | 9be10ce8dea8cd373a1302bad5014dc19a765a0e (patch) | |
| tree | 684bb145901e875cad0b2878d52c056ffdd6b4f9 | |
| parent | ae58b4777a3bf3bc19330f3c190897667c5c883b (diff) | |
| parent | 8503e0b55fdbd5558b4f19601136d20db0a59448 (diff) | |
| download | mullvadvpn-9be10ce8dea8cd373a1302bad5014dc19a765a0e.tar.xz mullvadvpn-9be10ce8dea8cd373a1302bad5014dc19a765a0e.zip | |
Merge branch 'logging-in-does-not-resume-background-api-requests-des-234'
| -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"); }); |
