|
|
@ -62,7 +62,7 @@ class WsClientThread(util.DaemonThread): |
|
|
|
util.DaemonThread.__init__(self) |
|
|
|
self.network = network |
|
|
|
self.config = config |
|
|
|
self.response_queue = Queue.Queue() |
|
|
|
self.response_queue = queue.Queue() |
|
|
|
self.subscriptions = defaultdict(list) |
|
|
|
|
|
|
|
def make_request(self, request_id): |
|
|
@ -80,7 +80,7 @@ class WsClientThread(util.DaemonThread): |
|
|
|
while self.is_running(): |
|
|
|
try: |
|
|
|
ws, request_id = request_queue.get() |
|
|
|
except Queue.Empty: |
|
|
|
except queue.Empty: |
|
|
|
continue |
|
|
|
try: |
|
|
|
addr, amount = self.make_request(request_id) |
|
|
@ -97,7 +97,7 @@ class WsClientThread(util.DaemonThread): |
|
|
|
while self.is_running(): |
|
|
|
try: |
|
|
|
r = self.response_queue.get(timeout=0.1) |
|
|
|
except Queue.Empty: |
|
|
|
except queue.Empty: |
|
|
|
continue |
|
|
|
util.print_error('response', r) |
|
|
|
method = r.get('method') |
|
|
|