From 90d8e745e39b5e49fcb1d50c1efa95148593496b Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sat, 19 Oct 2024 08:59:52 +0300 Subject: gpio diff events mode --- kvmd/htserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kvmd/htserver.py') diff --git a/kvmd/htserver.py b/kvmd/htserver.py index b0d78e82..351c1328 100644 --- a/kvmd/htserver.py +++ b/kvmd/htserver.py @@ -384,7 +384,7 @@ class HttpServer: break return ws.wsr - async def _broadcast_ws_event(self, event_type: str, event: (dict | None)) -> None: + async def _broadcast_ws_event(self, event_type: str, event: (dict | None), legacy: (bool | None)=None) -> None: if self.__ws_sessions: await asyncio.gather(*[ ws.send_event(event_type, event) @@ -393,6 +393,7 @@ class HttpServer: not ws.wsr.closed and ws.wsr._req is not None # pylint: disable=protected-access and ws.wsr._req.transport is not None # pylint: disable=protected-access + and (legacy is None or ws.kwargs.get("legacy") == legacy) ) ], return_exceptions=True) -- cgit v1.2.3