Updating code comments to reflect changes in listening for connections when using SOCKS.

This commit is contained in:
David Nichols 2013-07-12 13:40:06 -05:00
parent 97f0c56aa8
commit 27c0ac436c

View File

@ -21,9 +21,10 @@ class singleListener(threading.Thread):
self.selfInitiatedConnections = selfInitiatedConnections
def run(self):
# We don't want to accept incoming connections if the user is using a
# SOCKS proxy. If they eventually select proxy 'none' then this will
# start listening for connections.
# We typically don't want to accept incoming connections if the user is using a
# SOCKS proxy, unless they have configured otherwise. If they eventually select
# proxy 'none' or configure SOCKS listening then this will start listening for
# connections.
while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'):
time.sleep(300)
@ -40,9 +41,10 @@ class singleListener(threading.Thread):
sock.listen(2)
while True:
# We don't want to accept incoming connections if the user is using
# a SOCKS proxy. If the user eventually select proxy 'none' then
# this will start listening for connections.
# We typically don't want to accept incoming connections if the user is using a
# SOCKS proxy, unless they have configured otherwise. If they eventually select
# proxy 'none' or configure SOCKS listening then this will start listening for
# connections.
while shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and not shared.config.getboolean('bitmessagesettings', 'sockslisten'):
time.sleep(10)
while len(shared.connectedHostsList) > 220: