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 committed by Matthew DeGarmo
parent bc4fa0010f
commit 1eea3e97fd

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)