Import peers in main_loop
Also only if peer discovery is enabled. It's less confusing that way.
This commit is contained in:
parent
e2f1864a94
commit
ebc83b4028
@ -240,7 +240,6 @@ class PeerManager(util.LoggedClass):
|
||||
self.permit_onion_peer_time = time.time()
|
||||
self.proxy = SocksProxy(env.tor_proxy_host, env.tor_proxy_port,
|
||||
loop=self.loop)
|
||||
self.import_peers()
|
||||
|
||||
def my_clearnet_peer(self):
|
||||
'''Returns the clearnet peer representing this server, if any.'''
|
||||
@ -427,6 +426,8 @@ class PeerManager(util.LoggedClass):
|
||||
self.logger.info('peer discovery is disabled')
|
||||
return
|
||||
|
||||
self.import_peers()
|
||||
|
||||
# Wait a few seconds after starting the proxy detection loop
|
||||
# for proxy detection to succeed
|
||||
self.ensure_future(self.proxy.auto_detect_loop())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user