From e7506b2ac0355a82b2f8e7018946252ca5ebcaac Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Tue, 28 Feb 2017 09:43:09 +0100 Subject: [PATCH] Fix tracking of already attempted connections - it didn't delete the entries correctly, resulting in outgoing syn sender deadlocking --- src/class_receiveDataThread.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/class_receiveDataThread.py b/src/class_receiveDataThread.py index ca372944..90364228 100644 --- a/src/class_receiveDataThread.py +++ b/src/class_receiveDataThread.py @@ -77,7 +77,8 @@ class receiveDataThread(threading.Thread): self.initiatedConnection = False else: self.initiatedConnection = True - self.selfInitiatedConnections[streamNumber][self] = 0 + for stream in self.streamNumber: + self.selfInitiatedConnections[stream][self] = 0 self.someObjectsOfWhichThisRemoteNodeIsAlreadyAware = someObjectsOfWhichThisRemoteNodeIsAlreadyAware self.objectHashHolderInstance = objectHashHolderInstance self.startTime = time.time() @@ -132,7 +133,7 @@ class receiveDataThread(threading.Thread): self.processData() try: - for stream in self.remoteStreams: + for stream in self.streamNumber: try: del self.selfInitiatedConnections[stream][self] except KeyError: