From a1aadb0bce202bf246ad8181cae3210a4737a7c2 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 27 Feb 2018 15:45:12 -0500 Subject: [PATCH] fix join_dht attribute error --- lbrynet/core/Session.py | 1 - lbrynet/core/client/DHTPeerFinder.py | 20 +------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/lbrynet/core/Session.py b/lbrynet/core/Session.py index 1cc7fe349..a0d8eaa5d 100644 --- a/lbrynet/core/Session.py +++ b/lbrynet/core/Session.py @@ -287,7 +287,6 @@ class Session(object): log.info("Starting DHT") def start_dht(join_network_result): - self.peer_finder.run_manage_loop() self.hash_announcer.run_manage_loop() return True diff --git a/lbrynet/core/client/DHTPeerFinder.py b/lbrynet/core/client/DHTPeerFinder.py index f273e5900..b4f94097d 100644 --- a/lbrynet/core/client/DHTPeerFinder.py +++ b/lbrynet/core/client/DHTPeerFinder.py @@ -22,27 +22,9 @@ class DHTPeerFinder(object): self.dht_node = dht_node self.peer_manager = peer_manager self.peers = [] - self.next_manage_call = None - - def run_manage_loop(self): - self._manage_peers() - self.next_manage_call = reactor.callLater(60, self.run_manage_loop) def stop(self): - log.info("Stopping DHT peer finder.") - if self.next_manage_call is not None and self.next_manage_call.active(): - self.next_manage_call.cancel() - self.next_manage_call = None - - @defer.inlineCallbacks - def _manage_peers(self): - """ - If we don't know any active peer, let's try to reconnect to the preconfigured - known DHT nodes - """ - if not self.dht_node.hasContacts(): - log.info("No active peer. Re-attempt joining DHT") - yield self.dht_node.join_dht() + pass @defer.inlineCallbacks def find_peers_for_blob(self, blob_hash, timeout=None, filter_self=False):