Skip to content

Real-time network monitor + outbound firewall — see & block every connection. Privacy-first, local-first, Rust fleet agent, SIEM exports, 8 languages. / Moniteur réseau temps réel + pare-feu sortant, agent de flotte Rust, exports SIEM. 100 % local.

fix: guard broadcast client removal — a dead ws removed twice killed the batch

MoneyLisa39d686d4054c
diff --git a/backend/api/main.py b/backend/api/main.py
index 809dff0..605a2b3 100644
--- a/backend/api/main.py
+++ b/backend/api/main.py
@@ -206,7 +206,12 @@ async def broadcast(message: dict) -> None:
except Exception:
dead.append(ws)
for ws in dead:
- connected_clients.remove(ws)
+ # EN: the WS handler may have already dropped it — remove() must not
+ # raise on an absent element or the whole packet batch is lost.
+ # FR: le handler WS a pu le retirer avant — remove() ne doit pas
+ # lever sur un élément absent sinon tout le batch est perdu.
+ if ws in connected_clients:
+ connected_clients.remove(ws)
# ── Noise filtering / Filtrage du bruit ──────────────────────────────────────