forked from Qortal/qortal
Removed unnecessary synchronization
This commit is contained in:
parent
0352a09de7
commit
ea785f79b8
@ -475,23 +475,21 @@ public class OnlineAccountsManager extends Thread {
|
|||||||
|
|
||||||
int importCount = 0;
|
int importCount = 0;
|
||||||
|
|
||||||
synchronized(onlineAccountsImportQueue) {
|
// Add any online accounts to the queue that aren't already present
|
||||||
// Add any online accounts to the queue that aren't already present
|
for (OnlineAccountData onlineAccountData : peersOnlineAccounts) {
|
||||||
for (OnlineAccountData onlineAccountData : peersOnlineAccounts) {
|
|
||||||
|
|
||||||
// Do we already know about this online account data?
|
// Do we already know about this online account data?
|
||||||
if (onlineAccounts.contains(onlineAccountData)) {
|
if (onlineAccounts.contains(onlineAccountData)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
// Is it already in the import queue?
|
|
||||||
if (onlineAccountsImportQueue.contains(onlineAccountData)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
onlineAccountsImportQueue.add(onlineAccountData);
|
|
||||||
importCount++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Is it already in the import queue?
|
||||||
|
if (onlineAccountsImportQueue.contains(onlineAccountData)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
onlineAccountsImportQueue.add(onlineAccountData);
|
||||||
|
importCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGGER.debug(String.format("Added %d online accounts to queue", importCount));
|
LOGGER.debug(String.format("Added %d online accounts to queue", importCount));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user