Store all initial subscriptions

This commit is contained in:
Bálint Bokros 2018-01-25 17:04:34 +01:00
parent 14db8cae62
commit 585cd35e48

View File

@ -7,9 +7,9 @@ class EventHandlerBase:
def __init__(self, anchor): def __init__(self, anchor):
self.messaging = Messaging() self.messaging = Messaging()
self.anchor = anchor self.anchor = anchor
self.messaging.subscribe(self.anchor) self.subscriptions = set()
self.messaging.subscribe('reset') self.subscribe(self.anchor)
self.subscriptions = {self.anchor} self.subscribe('reset')
self.messaging.register_callback(self.event_handler_callback) self.messaging.register_callback(self.event_handler_callback)
def event_handler_callback(self, msg_parts): def event_handler_callback(self, msg_parts):