summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mullvad-daemon/src/wireguard.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/mullvad-daemon/src/wireguard.rs b/mullvad-daemon/src/wireguard.rs
index 4a56c1e900..f91a02a977 100644
--- a/mullvad-daemon/src/wireguard.rs
+++ b/mullvad-daemon/src/wireguard.rs
@@ -342,6 +342,7 @@ impl KeyManager {
tokio_timer::wheel()
.build()
.interval(AUTOMATIC_ROTATION_RETRY_DELAY)
+ .map_err(Error::RotationScheduleError)
.fold(public_key, move |old_public_key, _| {
let fut = Self::next_automatic_rotation(
daemon_tx.clone(),
@@ -352,7 +353,10 @@ impl KeyManager {
);
fut.then(|result| match result {
Ok(new_public_key) => Ok(new_public_key),
- Err(Error::TooManyKeys) => Ok(old_public_key),
+ Err(Error::TooManyKeys) => {
+ log::error!("Account has too many keys, stopping automatic rotation");
+ Err(Error::TooManyKeys)
+ }
Err(e) => {
log::error!(
"Key rotation failed: {}. Retrying in {} seconds",