test socket.close change
This commit is contained in:
parent
ddf347ecc5
commit
32d8a78fc7
|
@ -259,7 +259,9 @@ class receiveDataThread(QThread):
|
||||||
self.objectsOfWhichThisRemoteNodeIsAlreadyAware = objectsOfWhichThisRemoteNodeIsAlreadyAware
|
self.objectsOfWhichThisRemoteNodeIsAlreadyAware = objectsOfWhichThisRemoteNodeIsAlreadyAware
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
printLock.acquire()
|
||||||
|
print 'The size of the connectedHostsList is now', len(connectedHostsList)
|
||||||
|
printLock.release()
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
self.data += self.sock.recv(4096)
|
self.data += self.sock.recv(4096)
|
||||||
|
@ -444,6 +446,9 @@ class receiveDataThread(QThread):
|
||||||
remoteNodeIncomingPort, remoteNodeSeenTime = knownNodes[self.streamNumber][self.HOST]
|
remoteNodeIncomingPort, remoteNodeSeenTime = knownNodes[self.streamNumber][self.HOST]
|
||||||
printLock.acquire()
|
printLock.acquire()
|
||||||
print 'Connection fully established with', self.HOST, remoteNodeIncomingPort
|
print 'Connection fully established with', self.HOST, remoteNodeIncomingPort
|
||||||
|
print 'ConnectionsCount now:', connectionsCount[self.streamNumber]
|
||||||
|
print 'The size of the connectedHostsList is now', len(connectedHostsList)
|
||||||
|
print 'The length of sendDataQueues is now:', len(sendDataQueues)
|
||||||
print 'broadcasting addr from within connectionFullyEstablished function.'
|
print 'broadcasting addr from within connectionFullyEstablished function.'
|
||||||
printLock.release()
|
printLock.release()
|
||||||
self.broadcastaddr([(int(time.time()), self.streamNumber, 1, self.HOST, remoteNodeIncomingPort)]) #This lets all of our peers know about this new node.
|
self.broadcastaddr([(int(time.time()), self.streamNumber, 1, self.HOST, remoteNodeIncomingPort)]) #This lets all of our peers know about this new node.
|
||||||
|
@ -1984,6 +1989,7 @@ class sendDataThread(QThread):
|
||||||
QThread.__init__(self, parent)
|
QThread.__init__(self, parent)
|
||||||
self.mailbox = Queue.Queue()
|
self.mailbox = Queue.Queue()
|
||||||
sendDataQueues.append(self.mailbox)
|
sendDataQueues.append(self.mailbox)
|
||||||
|
print 'The length of sendDataQueues is now:', len(sendDataQueues)
|
||||||
self.data = ''
|
self.data = ''
|
||||||
|
|
||||||
def setup(self,sock,HOST,PORT,streamNumber,objectsOfWhichThisRemoteNodeIsAlreadyAware):
|
def setup(self,sock,HOST,PORT,streamNumber,objectsOfWhichThisRemoteNodeIsAlreadyAware):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user