Always create TorManager object with ConnectionServer, move tormanager start to sperate function

This commit is contained in:
shortcutme 2018-04-28 21:51:14 +02:00
parent 7fee135bf5
commit 8828f21f2e
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 19 additions and 20 deletions

View file

@ -27,10 +27,9 @@ class ConnectionServer(object):
self.port_opened = None
self.peer_blacklist = SiteManager.peer_blacklist
self.tor_manager = TorManager(self.ip, self.port)
if config.tor != "disabled":
self.tor_manager = TorManager(self.ip, self.port)
else:
self.tor_manager = None
self.tor_manager.start()
self.connections = [] # Connections
self.whitelist = config.ip_local # No flood protection on this ips