Use subscribe method from super, instead of using duplicated code

This commit is contained in:
Bálint Bokros 2017-12-05 18:37:20 +01:00
parent 92394cac27
commit 9d299a5f3e

View File

@ -26,9 +26,7 @@ class StatefulEventHandler(EventHandlerBase):
except StopIteration:
self.reset()
return
if response_anchor not in self.subscriptions:
self.subscriptions.add(response_anchor)
self.zmq_sub_socket.setsockopt_string(zmq.SUBSCRIBE, response_anchor)
self.subscribe(response_anchor)
response_data = json.dumps({
'anchor': response_anchor,
'data': response_data,