avoid infinite loop
This commit is contained in:
parent
2830e62df9
commit
a3a9f87d2c
1 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,7 @@ pub async fn update_user_list(config: PathBuf, up: watch::Sender<UserDatabase>)
|
||||||
Ok(x) => x,
|
Ok(x) => x,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
tracing::warn!(path=%config.as_path().to_string_lossy(), error=%e, "Unable to load config");
|
tracing::warn!(path=%config.as_path().to_string_lossy(), error=%e, "Unable to load config");
|
||||||
|
stream.recv().await;
|
||||||
continue;
|
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() {
|
for m in u.config.email_addresses.iter() {
|
||||||
if users_by_email.contains_key(m) {
|
if users_by_email.contains_key(m) {
|
||||||
tracing::warn!("Several users have the same email address: {}", m);
|
tracing::warn!("Several users have the same email address: {}", m);
|
||||||
|
stream.recv().await;
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
users_by_email.insert(m.clone(), u.clone());
|
users_by_email.insert(m.clone(), u.clone());
|
||||||
|
|
Loading…
Reference in a new issue