mirror of
https://github.com/necronicle/z2k.git
synced 2026-05-02 13:30:26 +00:00
Re-CONNECT sent new CONNECT for surviving streams after WS reconnect, but remote TCP was gone and clients were mid-TLS, so Telegram DC got garbage and closed immediately. Each re-CONNECT counted toward the 40 connect limit, causing Worker to close WS prematurely. Now: WS dies → all streams closed → WS reconnects → Telegram clients retry with fresh TLS. Clean and predictable. Also removed: PongHandler/ReadDeadline (caused 120s timeout kills), streamReadLoop retry loop, origIP/origPort/connected fields. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4.3 MiB
Executable file
4.3 MiB
Executable file