try to fix websocket shutdown
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m39s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m39s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user