forked from Qortal/qortal
Delete "old" peer from in-memory known peer cache too
This commit is contained in:
parent
5ad2bc1940
commit
d77acd9eb9
@ -1001,6 +1001,9 @@ public class Network {
|
|||||||
for (PeerData peerData : peers) {
|
for (PeerData peerData : peers) {
|
||||||
LOGGER.debug(() -> String.format("Deleting old peer %s from repository", peerData.getAddress().toString()));
|
LOGGER.debug(() -> String.format("Deleting old peer %s from repository", peerData.getAddress().toString()));
|
||||||
repository.getNetworkRepository().delete(peerData.getAddress());
|
repository.getNetworkRepository().delete(peerData.getAddress());
|
||||||
|
|
||||||
|
// Delete from known peer cache too
|
||||||
|
this.allKnownPeers.remove(peerData);
|
||||||
}
|
}
|
||||||
|
|
||||||
repository.saveChanges();
|
repository.saveChanges();
|
||||||
|
Loading…
Reference in New Issue
Block a user