From 0401a4c6bbf46d3363b3e19bb9ae407c166a69d3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 21:00:58 +0000 Subject: [PATCH 2/2] fix: initialize _ws_blacklist as set() instead of {} Co-authored-by: Flowseal <50780822+Flowseal@users.noreply.github.com> --- tg_ws_proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tg_ws_proxy.py b/tg_ws_proxy.py index 3fdd435..d5da6ba 100644 --- a/tg_ws_proxy.py +++ b/tg_ws_proxy.py @@ -39,7 +39,7 @@ _dc_opt: Dict[int, Optional[str]] = {} # DCs where WS is known to fail (302 redirect) # Raw TCP fallback will be used instead # Keyed by (dc, is_media) -_ws_blacklist: Set[Tuple[int, bool]] = {} +_ws_blacklist: Set[Tuple[int, bool]] = set() # Rate-limit re-attempts per (dc, is_media) _dc_fail_until: Dict[Tuple[int, bool], float] = {}