aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-12-21 09:32:48 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-12-21 09:32:48 +0100
commita3a9f87d2c1d2f1c01ecba3a00c592e477a6b22b (patch)
tree22d6825850d67b33db700b2d037397189ca6286a
parent2830e62df99dc236cd2ba63a909849cf973d2654 (diff)
downloadaerogramme-a3a9f87d2c1d2f1c01ecba3a00c592e477a6b22b.tar.gz
aerogramme-a3a9f87d2c1d2f1c01ecba3a00c592e477a6b22b.zip
avoid infinite loop
-rw-r--r--src/login/static_provider.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/login/static_provider.rs b/src/login/static_provider.rs
index 2e2e034..76ad6a6 100644
--- a/src/login/static_provider.rs
+++ b/src/login/static_provider.rs
@@ -35,6 +35,7 @@ pub async fn update_user_list(config: PathBuf, up: watch::Sender<UserDatabase>)
Ok(x) => x,
Err(e) => {
tracing::warn!(path=%config.as_path().to_string_lossy(), error=%e, "Unable to load config");
+ stream.recv().await;
continue;
}
};
@@ -49,6 +50,7 @@ pub async fn update_user_list(config: PathBuf, up: watch::Sender<UserDatabase>)
for m in u.config.email_addresses.iter() {
if users_by_email.contains_key(m) {
tracing::warn!("Several users have the same email address: {}", m);
+ stream.recv().await;
continue
}
users_by_email.insert(m.clone(), u.clone());