Improved online accounts processing, to avoid creating keys in the map before validation.

This commit is contained in:
CalDescent 2022-10-22 19:18:41 +01:00
parent 57125a91cf
commit 6f27d3798c

View File

@ -192,8 +192,8 @@ public class OnlineAccountsManager {
return;
// Skip this account if it's already validated
Set<OnlineAccountData> onlineAccounts = this.currentOnlineAccounts.computeIfAbsent(onlineAccountData.getTimestamp(), k -> ConcurrentHashMap.newKeySet());
if (onlineAccounts.contains(onlineAccountData)) {
Set<OnlineAccountData> onlineAccounts = this.currentOnlineAccounts.get(onlineAccountData.getTimestamp());
if (onlineAccounts != null && onlineAccounts.contains(onlineAccountData)) {
// We have already validated this online account
onlineAccountsImportQueue.remove(onlineAccountData);
continue;