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