Connectable peers ordered

This commit is contained in:
shortcutme 2017-02-27 00:13:18 +01:00
parent b65670b9e4
commit a6be8ddc2d
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -902,10 +902,9 @@ class Site(object):
return connected
# Return: Probably working, connectable Peers
# Return: Probably peers verified to be connectable recently
def getConnectablePeers(self, need_num=5, ignore=[]):
peers = self.peers.values()
random.shuffle(peers)
found = []
for peer in peers:
if peer.key.endswith(":0"):