show how many users

This commit is contained in:
2026-04-24 22:35:23 +02:00
parent 17c0f9df77
commit c0328affc8
+1
View File
@@ -117,6 +117,7 @@ def websocket_server_process(shared_data: dict, imc_q: multiprocessing.Queue, ws
async def handler_wrapper(websocket: ServerConnection): async def handler_wrapper(websocket: ServerConnection):
clients.add(websocket) clients.add(websocket)
await asyncio.get_event_loop().run_in_executor(None, ws_q.put, {"data": len(clients), "event": "users"})
try: await ws_handler(websocket, shared_data, imc_q, ws_q) try: await ws_handler(websocket, shared_data, imc_q, ws_q)
finally: finally:
await websocket.close(1001, "") await websocket.close(1001, "")