summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2020-10-05 18:47:20 +0100
committerEmīls <emils@mullvad.net>2020-10-12 12:21:04 +0100
commit98dd47e5d83010cb3d9a84e3ec67a913754fd1a6 (patch)
tree59268c3c007f66a16ed69f7a038fafa6c1d7bc26
parent0b0835c410eee472e97fb7113835f9b50ea31da7 (diff)
downloadmullvadvpn-98dd47e5d83010cb3d9a84e3ec67a913754fd1a6.tar.xz
mullvadvpn-98dd47e5d83010cb3d9a84e3ec67a913754fd1a6.zip
Maybe improve AccountHistory
-rw-r--r--mullvad-daemon/src/account_history.rs5
-rw-r--r--mullvad-daemon/src/lib.rs2
2 files changed, 5 insertions, 2 deletions
diff --git a/mullvad-daemon/src/account_history.rs b/mullvad-daemon/src/account_history.rs
index 8cceecda42..8853f58550 100644
--- a/mullvad-daemon/src/account_history.rs
+++ b/mullvad-daemon/src/account_history.rs
@@ -251,7 +251,10 @@ impl AccountHistory {
futures::future::join_all(removal).await;
- self.accounts = Arc::new(Mutex::new(VecDeque::new()));
+ {
+ let mut accounts = self.accounts.lock().unwrap();
+ *accounts = VecDeque::new();
+ }
self.save_to_disk().await
}
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs
index 14b0c1e06c..09f522bd81 100644
--- a/mullvad-daemon/src/lib.rs
+++ b/mullvad-daemon/src/lib.rs
@@ -5,7 +5,7 @@
extern crate serde;
-mod account_history;
+pub mod account_history;
pub mod exception_logging;
mod geoip;
pub mod logging;