mirror of
				https://github.com/avatao-content/baseimage-tutorial-framework
				synced 2025-11-04 07:32:55 +00:00 
			
		
		
		
	Fix ZMQWebSocketHandler's sockets being bound several times
This commit is contained in:
		@@ -7,9 +7,10 @@ from event_handler_connector import EventHandlerConnector
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class ZMQWebSocketHandler(WebSocketHandler):
 | 
			
		||||
    def __init__(self, application, request, **kwargs):
 | 
			
		||||
    _event_handler_connector = EventHandlerConnector()  #<--------------------. TODO: how is __init__()
 | 
			
		||||
                                                        # fix: made it static | TODO: called more than once?
 | 
			
		||||
    def __init__(self, application, request, **kwargs): #---------------------'
 | 
			
		||||
        super().__init__(application, request, **kwargs)
 | 
			
		||||
        self._event_handler_connector = EventHandlerConnector()
 | 
			
		||||
 | 
			
		||||
    def open(self, *args, **kwargs):
 | 
			
		||||
        logging.debug('WebSocket connection initiated')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user