try to fix websocket shutdown
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m39s

This commit is contained in:
2026-03-07 10:35:29 +01:00
parent 299f2e9978
commit 8e6c759cb8
2 changed files with 39 additions and 1 deletions

View File

@@ -6,6 +6,8 @@ from typing import Any, Dict, List, Optional
logger = logging.getLogger("packet_broadcaster")
_SHUTDOWN_SENTINEL: Dict[str, Any] = {"type": "__broadcaster_shutdown__"}
class PacketBroadcaster:
"""Manage subscriber queues and publish packet events."""
@@ -96,5 +98,6 @@ class PacketBroadcaster:
try:
while not queue.empty():
queue.get_nowait()
queue.put_nowait(_SHUTDOWN_SENTINEL)
except Exception:
pass