diff options
| -rw-r--r-- | mullvad-daemon/src/relays.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs index 82a30d3f7c..9971d04c8f 100644 --- a/mullvad-daemon/src/relays.rs +++ b/mullvad-daemon/src/relays.rs @@ -807,11 +807,9 @@ 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() { |
