From a19629d10545a2f42291810b7a4e6117d1d26eea Mon Sep 17 00:00:00 2001 From: shortcutme Date: Sun, 29 Apr 2018 01:00:37 +0200 Subject: [PATCH] Start tor_manager with ConnectionServer --- src/Connection/ConnectionServer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Connection/ConnectionServer.py b/src/Connection/ConnectionServer.py index dc5d3c00..964c69e3 100644 --- a/src/Connection/ConnectionServer.py +++ b/src/Connection/ConnectionServer.py @@ -28,9 +28,6 @@ class ConnectionServer(object): self.peer_blacklist = SiteManager.peer_blacklist self.tor_manager = TorManager(self.ip, self.port) - if config.tor != "disabled": - self.tor_manager.start() - self.connections = [] # Connections self.whitelist = config.ip_local # No flood protection on this ips self.ip_incoming = {} # Incoming connections from ip in the last minute to avoid connection flood @@ -66,6 +63,8 @@ class ConnectionServer(object): self.running = True self.thread_checker = gevent.spawn(self.checkConnections) CryptConnection.manager.loadCerts() + if config.tor != "disabled": + self.tor_manager.start() if not self.port: self.log.info("No port found, not binding") return False