Revert duplicate IP treatment for bootstrap

- bootstrap provider mode shouldn't accept multiple connections from a
  single IP after all, it creates problems
This commit is contained in:
Peter Šurda 2017-02-28 00:20:34 +01:00
parent d0b0d15dc3
commit 59e1739136
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -141,10 +141,6 @@ class singleListener(threading.Thread, StoppableThread):
# permit repeated connections from Tor
if HOST in shared.connectedHostsList and \
(".onion" not in BMConfigParser().get('bitmessagesettings', 'onionhostname') or not protocol.checkSocksIP(HOST)):
# bootstrap provider? Then accept, we'll most likely drop it a little bit later
if BMConfigParser().safeGetInt('bitmessagesettings', 'maxoutboundconnections') >= \
BMConfigParser().safeGetInt('bitmessagesettings', 'maxtotalconnections', 200):
break
socketObject.close()
logger.info('We are already connected to ' + str(HOST) + '. Ignoring connection.')
else: