mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
fix concurrent modification exception in peer manager
This commit is contained in:
parent
497de47965
commit
59b2a1121b
@ -774,7 +774,9 @@ public final class PeerManager implements ConnectionListener, PersistedDataHost
|
||||
// If not found in connection we look up if we got the Capabilities set from any of the
|
||||
// reported or persisted peers
|
||||
Set<Peer> persistedAndReported = new HashSet<>(getPersistedPeers());
|
||||
persistedAndReported.addAll(getReportedPeers());
|
||||
synchronized (reportedPeers) {
|
||||
persistedAndReported.addAll(reportedPeers);
|
||||
}
|
||||
Optional<Peer> candidate = persistedAndReported.stream()
|
||||
.filter(peer -> peer.getNodeAddress().equals(peersNodeAddress))
|
||||
.filter(peer -> !peer.getCapabilities().isEmpty())
|
||||
|
Loading…
Reference in New Issue
Block a user