protect for threading

This commit is contained in:
David Rose 2009-12-19 07:19:38 +00:00
parent 1fc71a28e8
commit 39a745bdaa

View File

@ -302,8 +302,7 @@ class ServerRepository:
return task.cont
# Crazy dereferencing
newConnection=newConnection.p()
self.qcr.addConnection(newConnection)
newConnection = newConnection.p()
# Add clients information to dictionary
id = self.idAllocator.allocate()
@ -315,6 +314,9 @@ class ServerRepository:
client = self.Client(newConnection, netAddress, doIdBase)
self.clientsByConnection[client.connection] = client
self.clientsByDoIdBase[client.doIdBase] = client
# Now we can start listening to that new connection.
self.qcr.addConnection(newConnection)
self.lastConnection = newConnection
self.sendDoIdRange(client)