fix tcp responder
authorThomasV <thomasv@gitorious>
Tue, 30 Apr 2013 14:13:21 +0000 (18:13 +0400)
committerThomasV <thomasv@gitorious>
Tue, 30 Apr 2013 14:13:21 +0000 (18:13 +0400)
transports/stratum_tcp.py

index 2a9463f..5fb26a5 100644 (file)
@@ -63,7 +63,6 @@ class TcpClientResponder(threading.Thread):
 
     def __init__(self, session):
         self.session = session
-        self.connection = self.session.connection()
         threading.Thread.__init__(self)
 
     def run(self):
@@ -72,7 +71,7 @@ class TcpClientResponder(threading.Thread):
             data = json.dumps(response) + "\n"
             try:
                 while data:
-                    l = self.connection.send(data)
+                    l = self.session.connection().send(data)
                     data = data[l:]
             except:
                 self.session.stop()