add session before the requestor is started
authorThomasV <thomasv@gitorious>
Tue, 29 May 2012 12:25:36 +0000 (16:25 +0400)
committerThomasV <thomasv@gitorious>
Tue, 29 May 2012 12:25:36 +0000 (16:25 +0400)
transports/stratum_tcp.py

index 85fc8b7..8f0c936 100644 (file)
@@ -123,11 +123,8 @@ class TcpServer(threading.Thread):
         sock.listen(1)
         while not self.shared.stopped():
             session = TcpSession(*sock.accept())
-            client_req = TcpClientRequestor(self.dispatcher, session)
-            client_req.start()
             self.dispatcher.add_session(session)
             self.dispatcher.collect_garbage()
-
-
-
+            client_req = TcpClientRequestor(self.dispatcher, session)
+            client_req.start()