summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--mullvad-daemon/src/relays.rs8
2 files changed, 7 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f08f974260..5aec0faa1a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,10 @@ Line wrap the file at 100 chars. Th
- Show a warning in the CLI if the provided location constraints don't match any known relay.
### Fixed
+- Fix high CPU usage in 2020.6-beta1. This was due to an incorrectly initialized stream in the
+ relay list updater.
+- Fix the relay list not being updated in 2020.6-beta1 after the daemon has started.
+
#### Android
- Fix possible crash when starting the app, caused by trying to use JNI functions before the library
is loaded.
diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs
index 82a30d3f7c..78e0292023 100644
--- a/mullvad-daemon/src/relays.rs
+++ b/mullvad-daemon/src/relays.rs
@@ -807,14 +807,12 @@ impl RelayListUpdater {
}
async fn run(mut self, mut cmd_rx: mpsc::Receiver<()>) {
+ let mut check_interval = tokio02::time::interval(UPDATE_CHECK_INTERVAL).fuse();
+ let mut download_future = Box::pin(Fuse::terminated());
loop {
- let mut check_interval = tokio02::time::interval(UPDATE_CHECK_INTERVAL).fuse();
- let mut download_future = Box::pin(Fuse::terminated());
-
-
futures::select! {
_check_update = check_interval.next() => {
- if !download_future.is_terminated() && self.should_update() {
+ if download_future.is_terminated() && self.should_update() {
download_future = Box::pin(Self::download_relay_list(self.rpc_client.clone()).fuse());
self.earliest_next_try = Instant::now() + UPDATE_INTERVAL;
}