Multiple connections on hidden service fix

- there was a bug which prevented multiple parallel connections on
  hidden service
This commit is contained in:
Peter Šurda 2016-06-10 18:01:46 +02:00
parent b0446f412a
commit 0dd54e606d
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -123,7 +123,7 @@ class singleListener(threading.Thread, StoppableThread):
# share the same external IP. This is here to prevent # share the same external IP. This is here to prevent
# connection flooding. # connection flooding.
# permit repeated connections from Tor # permit repeated connections from Tor
if HOST in shared.connectedHostsList and (".onion" not in shared.config.get('bitmessagesettings', 'onionhostname') or shared.checkSocksIP(HOST)): if HOST in shared.connectedHostsList and (".onion" not in shared.config.get('bitmessagesettings', 'onionhostname') or not shared.checkSocksIP(HOST)):
socketObject.close() socketObject.close()
logger.info('We are already connected to ' + str(HOST) + '. Ignoring connection.') logger.info('We are already connected to ' + str(HOST) + '. Ignoring connection.')
else: else: