Don't add online accounts to the import queue if they are already validated

This commit is contained in:
CalDescent 2022-09-23 18:02:46 +01:00
parent 49d83650f4
commit 84a16157d1

View File

@ -792,6 +792,12 @@ public class OnlineAccountsManager {
// Add any online accounts to the queue that aren't already present
for (OnlineAccountData onlineAccountData : peersOnlineAccounts) {
Set<OnlineAccountData> onlineAccounts = this.currentOnlineAccounts.computeIfAbsent(onlineAccountData.getTimestamp(), k -> ConcurrentHashMap.newKeySet());
if (onlineAccounts.contains(onlineAccountData))
// We have already validated this online account
continue;
boolean isNewEntry = onlineAccountsImportQueue.add(onlineAccountData);
if (isNewEntry)