diff options
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/apps/kvmd/http.py | 1 | ||||
-rw-r--r-- | kvmd/apps/kvmd/server.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/kvmd/apps/kvmd/http.py b/kvmd/apps/kvmd/http.py index c1525046..e436844a 100644 --- a/kvmd/apps/kvmd/http.py +++ b/kvmd/apps/kvmd/http.py @@ -240,6 +240,7 @@ class HttpServer: aiohttp.web.run_app( app=self._make_app(), + shutdown_timeout=1, access_log_format=access_log_format, print=self.__run_app_print, **socket_kwargs, diff --git a/kvmd/apps/kvmd/server.py b/kvmd/apps/kvmd/server.py index 08b310d0..a8c4d0d6 100644 --- a/kvmd/apps/kvmd/server.py +++ b/kvmd/apps/kvmd/server.py @@ -367,6 +367,8 @@ class KvmdServer(HttpServer): # pylint: disable=too-many-arguments,too-many-ins for client in list(self.__ws_clients): await self.__remove_ws_client(client) + logger.info("On-Shutdown complete") + async def __on_cleanup(self, _: aiohttp.web.Application) -> None: logger = get_logger(0) for component in self.__components: @@ -376,6 +378,7 @@ class KvmdServer(HttpServer): # pylint: disable=too-many-arguments,too-many-ins await component.cleanup() # type: ignore except Exception: logger.exception("Cleanup error on %s", component.name) + logger.info("On-Cleanup complete") async def __send_event(self, ws: aiohttp.web.WebSocketResponse, event_type: str, event: Optional[Dict]) -> None: await ws.send_str(json.dumps({ |