def process(self, request):
pass
+ def add_request(self, request):
+ self.queue.put(request)
+
def push_response(self, response):
#print "response", response
self.dispatcher.request_dispatcher.push_response(response)
print "error: no processor for", prefix
return
- p.queue.put(request)
+ p.add_request(request)
if method in ['server.version']:
session.version = params[0]
method = response.get('method')
params = response.get('params')
- if method == "blockchain.address.subscribe2":
- method = "blockchain.address.subscribe"
-
# A notification
if internal_id is None: # and method is not None and params is not None:
self.notification(method, params, response)
if session.stopped():
continue
if session.contains_subscription(subdesc):
+ if response.get('method') == "blockchain.address.subscribe2":
+ response['method'] = "blockchain.address.subscribe"
session.send_response(response)
def send_response(self, internal_id, response):