mirror of
https://github.com/necronicle/z2k.git
synced 2026-05-02 13:30:26 +00:00
fix(tunnel): start client read immediately, await socket.opened
Two bugs causing "Connecting..." hang: 1. tunnel.go: streamReadLoop was deferred until CONNECT_OK arrived, but client already sends TLS ClientHello before that. Data was lost → DC never responded → timeout. Fix: start readLoop immediately after sending CONNECT frame. 2. worker.js: connect() was called but socket.opened was not awaited before sending CONNECT_OK. Fix: await socket.opened, and fix Uint8Array buffer slicing for DATA relay. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a00f6307fc
commit
109140124a
3 changed files with 13 additions and 5 deletions
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue