X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=blobdiff_plain;f=transports%2Fstratum_tcp.py;h=cae116c79bef355b8ae00665f6c346cee2acdb07;hp=aad4c17d87ffdafbd31c0e649c1a606bf2778f30;hb=77511c85467a86cd5b03b8da3ddd929857c3f5e8;hpb=4d29c30f4782abb7b5eb663e17d82b3f51831d21 diff --git a/transports/stratum_tcp.py b/transports/stratum_tcp.py index aad4c17..cae116c 100644 --- a/transports/stratum_tcp.py +++ b/transports/stratum_tcp.py @@ -128,7 +128,7 @@ class TcpClientRequestor(threading.Thread): try: command = json.loads(raw_command) except: - self.dispatcher.push_response({"error": "bad JSON", "request": raw_command}) + self.dispatcher.push_response(self.session, {"error": "bad JSON", "request": raw_command}) return True try: @@ -138,7 +138,7 @@ class TcpClientRequestor(threading.Thread): method = command['method'] except KeyError: # Return an error JSON in response. - self.dispatcher.push_response({"error": "syntax error", "request": raw_command}) + self.dispatcher.push_response(self.session, {"error": "syntax error", "request": raw_command}) else: self.dispatcher.push_request(self.session, command) # sleep a bit to prevent a single session from DOSing the queue