More knownNodes init

- also init children if they are missing
This commit is contained in:
Peter Šurda 2017-02-08 20:52:18 +01:00
parent b0539f5cb4
commit e664746f04
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -71,6 +71,10 @@ def connectToStream(streamNumber):
with knownnodes.knownNodesLock: with knownnodes.knownNodesLock:
if streamNumber not in knownnodes.knownNodes: if streamNumber not in knownnodes.knownNodes:
knownnodes.knownNodes[streamNumber] = {} knownnodes.knownNodes[streamNumber] = {}
if streamNumber*2 not in knownnodes.knownNodes:
knownnodes.knownNodes[streamNumber*2] = {}
if streamNumber*2+1 not in knownnodes.knownNodes:
knownnodes.knownNodes[streamNumber*2+1] = {}
for i in range(maximumNumberOfHalfOpenConnections): for i in range(maximumNumberOfHalfOpenConnections):
a = outgoingSynSender() a = outgoingSynSender()