mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Previously the container was killed with connector child processes still mid-session, so the target TS3/TeaSpeak server only noticed the drop via its own timeout. A client's automatic reconnect (see App.tsx's scheduleReconnect) landing before that timeout got rejected as a duplicate identity (e.g. ClientTooManyClonesConnected). Now SIGTERM disconnects every live connection first (bounded to 5s) so the target server frees the slot immediately. The connector's own resulting "disconnected" event is suppressed from reaching the browser during shutdown (shuttingDown flag) so the browser sees a raw socket close, which it treats as an unexpected drop and retries, rather than an explicit disconnect, which it treats as deliberate and gives up on. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU