summaryrefslogtreecommitdiff
path: root/kvmd/htserver.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-10-19 08:59:52 +0300
committerMaxim Devaev <[email protected]>2024-10-19 08:59:52 +0300
commit90d8e745e39b5e49fcb1d50c1efa95148593496b (patch)
treef098894e16275d8fe80b8cb16bb615ff3a106e5e /kvmd/htserver.py
parent3852d0a4568c3726d0182f3b00a9a3e8bb7e8af9 (diff)
gpio diff events mode
Diffstat (limited to 'kvmd/htserver.py')
-rw-r--r--kvmd/htserver.py3
1 files changed, 2 insertions, 1 deletions
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)