KnownNodes missing init

- init knownnodes when connecting to a stream
This commit is contained in:
Peter Šurda 2017-02-08 20:48:22 +01:00
parent 157881bc63
commit 35a712d11d
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -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)