Connectable peers ordered
This commit is contained in:
parent
b65670b9e4
commit
a6be8ddc2d
1 changed files with 1 additions and 2 deletions
|
@ -902,10 +902,9 @@ class Site(object):
|
||||||
|
|
||||||
return connected
|
return connected
|
||||||
|
|
||||||
# Return: Probably working, connectable Peers
|
# Return: Probably peers verified to be connectable recently
|
||||||
def getConnectablePeers(self, need_num=5, ignore=[]):
|
def getConnectablePeers(self, need_num=5, ignore=[]):
|
||||||
peers = self.peers.values()
|
peers = self.peers.values()
|
||||||
random.shuffle(peers)
|
|
||||||
found = []
|
found = []
|
||||||
for peer in peers:
|
for peer in peers:
|
||||||
if peer.key.endswith(":0"):
|
if peer.key.endswith(":0"):
|
||||||
|
|
Loading…
Reference in a new issue