minor improvement in ConnectionServer
This commit is contained in:
parent
ab9e8322fa
commit
74f8a6e11e
1 changed files with 2 additions and 2 deletions
|
@ -164,9 +164,9 @@ class ConnectionServer(object):
|
|||
|
||||
def getConnection(self, ip=None, port=None, peer_id=None, create=True, site=None, is_tracker_connection=False):
|
||||
ip_type = helper.getIpType(ip)
|
||||
has_per_site_onion = (ip.endswith(".onion") or self.port_opened.get(ip_type, None) == False) and self.tor_manager.start_onions and site
|
||||
has_per_site_onion = (ip_type == 'onion' or self.port_opened.get(ip_type, None) == False) and self.tor_manager.start_onions and site
|
||||
if has_per_site_onion: # Site-unique connection for Tor
|
||||
if ip.endswith(".onion"):
|
||||
if ip_type == 'onion':
|
||||
site_onion = self.tor_manager.getOnion(site.address)
|
||||
else:
|
||||
site_onion = self.tor_manager.getOnion("global")
|
||||
|
|
Loading…
Reference in a new issue