Only add recent peers if there is more
This commit is contained in:
parent
0c91fd396e
commit
7d3fd6f5b6
1 changed files with 1 additions and 1 deletions
|
@ -553,7 +553,7 @@ class Site(object):
|
|||
random.shuffle(peers)
|
||||
peers = sorted(peers, key=lambda peer: peer.connection.handshake.get("rev", 0) < config.rev - 100) # Prefer newer clients
|
||||
|
||||
if len(peers) < limit * 2: # Add more, non-connected peers if necessary
|
||||
if len(peers) < limit * 2 and len(self.peers) > len(peers): # Add more, non-connected peers if necessary
|
||||
peers += self.getRecentPeers(limit * 2)
|
||||
|
||||
peers = set(peers)
|
||||
|
|
Loading…
Reference in a new issue