jsonrpc compliance.
[electrum-server.git] / processor.py
index 837d78d..1ea9649 100644 (file)
@@ -177,8 +177,10 @@ class Session:
                 break
         else:
             addr = None
-        print timestr(), self.name, self.address, addr,\
-            len(self.subscriptions), self.version
+
+        if self.subscriptions:
+            print timestr(), self.name, self.address, addr,\
+                len(self.subscriptions), self.version
 
     def stopped(self):
         with self.lock:
@@ -246,6 +248,9 @@ class ResponseDispatcher(threading.Thread):
 
     def send_response(self, internal_id, response):
         session, message_id = self.processor.get_session_id(internal_id)
-        response['id'] = message_id
-        session.send_response(response)
+        if session:
+            response['id'] = message_id
+            session.send_response(response)
+        else:
+            print "send_response: no session", message_id, internal_id, response