@ -206,12 +206,20 @@ class singleListener(threading.Thread):
#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.
print'We are connected to too many people. Not accepting further incoming connections for ten seconds.'
shared.printLock.release()
time.sleep(10)
a,(HOST,PORT)=sock.accept()
#Users are finding that if they run more than one node in the same network (thus with the same public IP), they can not connect with the second node. This is because this section of code won't accept the connection from the same IP. This problem will go away when the Bitmessage network grows beyond being tiny but in the mean time I'll comment out this code section.
"""while HOST in shared.connectedHostsList:
#The following code will, unfortunately, block an incoming connection if someone else on the same LAN is already connected because the two computers will share the same external IP. This is here to prevent connection flooding.
whileHOSTinshared.connectedHostsList:
shared.printLock.acquire()
print'incoming connection is from a host in shared.connectedHostsList (we are already connected to it). Ignoring it.'
shared.printLock.release()
a.close()
a,(HOST,PORT)=sock.accept()"""
a,(HOST,PORT)=sock.accept()
objectsOfWhichThisRemoteNodeIsAlreadyAware={}
sd=sendDataThread()
@ -239,7 +247,6 @@ class receiveDataThread(threading.Thread):
self.sock=sock
self.HOST=HOST
self.PORT=port
self.sock.settimeout(600)#We'll send out a pong every 5 minutes to make sure the connection stays alive if there has been no other traffic to send lately.
self.streamNumber=streamNumber
self.payloadLength=0#This is the protocol payload length thus it doesn't include the 24 byte message header
self.sock.settimeout(600)#We'll send out a pong every 5 minutes to make sure the connection stays alive if there has been no other traffic to send lately.