From 4a15903d3d9432d8b9973accf30e45b1950b413a Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 14 Oct 2021 17:41:17 +0200 Subject: [PATCH] add a try catch to avoid a dumb error --- run.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run.py b/run.py index 0fd4b20..0d2a3ff 100644 --- a/run.py +++ b/run.py @@ -523,7 +523,10 @@ async def broadcast(message, channels): dead_ws.append(ws) for to_remove in dead_ws: - ws_list.remove(to_remove) + try: + ws_list.remove(to_remove) + except ValueError: + pass def subscribe(ws, channel): subscriptions[channel].append(ws)