Mercurial > libervia-web
diff libervia/server/websockets.py @ 1506:ce879da7fcf7
server: fix `on_signal` callback
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 23 Mar 2023 17:50:54 +0100 |
parents | 409d10211b20 |
children | 106bae41f5c8 |
line wrap: on
line diff
--- a/libervia/server/websockets.py Sat Mar 04 18:37:17 2023 +0100 +++ b/libervia/server/websockets.py Thu Mar 23 17:50:54 2023 +0100 @@ -41,7 +41,7 @@ super().__init__() self._init_ok: bool = False self.__profile: Optional[str] = None - self.__session: Optional[session_iface.SATSession] = None + self.__session: Optional[session_iface.WebSession] = None @property def init_ok(self): @@ -52,7 +52,7 @@ if not self._init_ok and data_type != "error": raise exceptions.InternalError( "send called when not initialized, this should not happend! Please use " - "SATSession.send which takes care of sending correctly the data to all " + "WebSession.send which takes care of sending correctly the data to all " "sessions." ) @@ -102,7 +102,7 @@ ) session.touch() - session_data = session.getComponent(session_iface.ISATSession) + session_data = session.getComponent(session_iface.IWebSession) if session_data.ws_socket is not None: log.warning("Session socket is already set, force closing it") session_data.ws_socket.send( @@ -203,7 +203,7 @@ else: log.debug(f"reseting websocket session for {self.__profile}") self.__session.ws_socket = None - sessions = session_iface.SATSession.get_profile_sessions(self.__profile) + sessions = session_iface.WebSession.get_profile_sessions(self.__profile) log.debug(f"websocket connection for profile {self.__profile} closed") self.__profile = None