Files
stoat-mbot/src
Leonid PershinandClaude Opus 5 c7f2080604 Leave voice before closing the server on shutdown
AlreadyConnected kept coming back after every rebuild. Shutdown closed
the HTTP server first, which blocks while the panel's WebSocket is open,
so Docker's grace period ran out and the process was killed before it
ever left the voice channels — and Stoat only clears a bot's voice state
when it disconnects, leaving the stale entry that refuses the next join.

Voice channels are now left first, and each shutdown step has its own
deadline so neither can eat the grace period.

A failed join_call also escaped as an unhandled rejection with a full
stack, because revoice awaits it inside an async executor it never
guards; the error is already latched and reported, so that call no longer
settles at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-09 02:44:36 +03:00
..