From 35a712d11da1a8c9df856a3ed593c68366e46daa Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Wed, 8 Feb 2017 20:48:22 +0100 Subject: [PATCH] KnownNodes missing init - init knownnodes when connecting to a stream --- src/bitmessagemain.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 49954643..e0da839d 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -29,6 +29,7 @@ from helper_startup import isOurOperatingSystemLimitedToHavingVeryFewHalfOpenCon import defaults import shared from helper_sql import sqlQuery +import knownnodes import state import shutdown import threading @@ -66,6 +67,11 @@ def connectToStream(streamNumber): maximumNumberOfHalfOpenConnections = 4 except: pass + + with knownnodes.knownNodesLock: + if streamNumber not in knownnodes.knownNodes: + knownnodes.knownNodes[streamNumber] = {} + for i in range(maximumNumberOfHalfOpenConnections): a = outgoingSynSender() a.setup(streamNumber, selfInitiatedConnections)