Move FSM instantiation out of FSMManagingSocketHandler

This commit is contained in:
Bálint Bokros
2018-02-08 14:46:00 +01:00
parent 849fd7b61c
commit 8b9f7e50cb
2 changed files with 5 additions and 13 deletions

View File

@ -41,12 +41,8 @@ class ZMQWebSocketHandler(WebSocketHandler):
class FSMManagingSocketHandler(ZMQWebSocketHandler):
fsm = None
def __init__(self, FSM, application, request, **kwargs):
super().__init__(application, request, **kwargs)
if self.fsm is None:
FSMManagingSocketHandler.fsm = FSM()
def initialize(self, fsm):
self.fsm = fsm
self.fsm.subscribe_message_handler(self.handle_fsm_message)
def on_close(self):