mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 23:41:33 +00:00
Fix ZMQWebSocketHandlers handling their own little FSM instances
This commit is contained in:
parent
96762575ba
commit
654a732368
@ -44,9 +44,12 @@ class ZMQWebSocketHandler(WebSocketHandler):
|
|||||||
|
|
||||||
|
|
||||||
class FSMManagingSocketHandler(ZMQWebSocketHandler):
|
class FSMManagingSocketHandler(ZMQWebSocketHandler):
|
||||||
|
fsm = None
|
||||||
|
|
||||||
def __init__(self, FSM, application, request, **kwargs):
|
def __init__(self, FSM, application, request, **kwargs):
|
||||||
super().__init__(application, request, **kwargs)
|
super().__init__(application, request, **kwargs)
|
||||||
self.fsm = FSM()
|
if self.fsm is None:
|
||||||
|
FSMManagingSocketHandler.fsm = FSM()
|
||||||
self.fsm.subscribe_message_handler(self.handle_fsm_message)
|
self.fsm.subscribe_message_handler(self.handle_fsm_message)
|
||||||
|
|
||||||
def handle_fsm_message(self, message):
|
def handle_fsm_message(self, message):
|
||||||
|
Loading…
Reference in New Issue
Block a user