mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-20 07:04:53 +00:00
Codex P2: when a transport error (ECONNRESET) arrives after the session is established, the error handler was immediately sending netcatty:exit, causing preload to remove data listeners before the stream close handler could flush the 8ms data buffer. Users would lose the last chunk of terminal output. Now the error handler stores the error message on the session object (_transportError) instead of sending exit immediately. The close handler (which fires after stream close + buffer flush) checks for this flag and sends the exit event with the transport error info. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>