Skip to content

Handle Discord voice connection errors - #1329

Merged
shiftybitshiftr merged 1 commit into
museofficial:masterfrom
shiftybitshiftr:agent/handle-voice-connection-errors
Jul 11, 2026
Merged

shiftybitshiftr merged 1 commit into
museofficial:masterfrom
shiftybitshiftr:agent/handle-voice-connection-errors

Conversation

@shiftybitshiftr

Copy link
Copy Markdown
Contributor

What changed

Register an error listener on every Discord VoiceConnection immediately after it is created.

Why

The pct118 Muse container crashed and restarted after a transient Discord voice WebSocket timeout:

Error: connect ETIMEDOUT 10.0.0.1:2053
Emitted 'error' event on VoiceConnection instance

@discordjs/voice propagates networking failures through Node's special error event. Muse did not subscribe to that event, so Node treated the transient transport failure as fatal before the existing voice disconnect/reconnect state machine could run.

Impact

Transient Discord voice networking errors are logged with the guild context instead of terminating the entire bot process. Existing state-change, disconnect, and reconnect behavior is unchanged.

Validation

  • npm test
  • npm run typecheck
  • npm run build
  • git diff --check
  • Structured autoreview: clean, no actionable findings

After the PR snapshot workflow publishes ghcr.io/museofficial/muse:pr-<number>, it will be backed up and canary-tested on the live pct118 Muse container before merge.

@github-actions

Copy link
Copy Markdown

馃摝 馃 A new release has been made for this pull request.

To play around with this PR, pull ghcr.io/museofficial/muse:pr-1329.

Images are available for x86_64 and ARM64.

Latest commit: 2c0bcb0

@shiftybitshiftr
shiftybitshiftr marked this pull request as ready for review July 11, 2026 06:43
@shiftybitshiftr
shiftybitshiftr merged commit 6a2241b into museofficial:master Jul 11, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown

馃殌 Released in Release v2.11.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant