mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
writeLine()'s killed check only reflects Node-side .kill() calls, so it can't catch the connector exiting on its own (e.g. the TS3 server drops it) and closing its stdin first. Writing to that closed pipe threw an unhandled EPIPE 'error' event, which Node treats as fatal - crashing the gateway and every other client's live session along with it. Listening for the error on child.stdin turns it into an isolated write failure. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU