From 0506dfba1047ae6f13a1aa2ee61b9e366c1a0390 Mon Sep 17 00:00:00 2001 From: Jimmy Kiselak Date: Mon, 31 Aug 2015 11:14:25 -0400 Subject: [PATCH] when looking up peers, only return one instance of each peer --- lbrynet/core/client/DHTPeerFinder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/core/client/DHTPeerFinder.py b/lbrynet/core/client/DHTPeerFinder.py index 4ee3266f4..ab5dd1b3a 100644 --- a/lbrynet/core/client/DHTPeerFinder.py +++ b/lbrynet/core/client/DHTPeerFinder.py @@ -32,8 +32,9 @@ class DHTPeerFinder(object): bin_hash = binascii.unhexlify(blob_hash) def filter_peers(peer_list): + peers = set(peer_list) good_peers = [] - for host, port in peer_list: + for host, port in peers: peer = self.peer_manager.get_peer(host, port) if peer.is_available() is True: good_peers.append(peer)