fix(voice, music): resolve thundering herd rejoins, playback drop recovery, and telemetry warnings

- Stagger simultaneous 24/7 channel rejoins (+2.5s per pending channel) and defer rejoins when the gateway is not connected
- Add in-place voice reconnection recovery during track playback to prevent burning through queue songs on transient LiveKit disconnects
- Fix audio publication race on seek by removing redundant bridge stop and increasing unpublish timeout to 2,500ms
- Eliminate duplicate voice reconnect races in Player disconnect handler for 24/7 channels
- De-escalate routine background reconnect logs from logger.warn/error to logger.voice247/player to stop spurious Discord warning embeds
- Sanitize upstream Cloudflare/Fluxer 503 HTML error pages into single-line messages in ErrorChannel
This commit is contained in:
NoLogicAlan committed 2026-11-06 01:46:27 +03:00
1 parent 8b99bd01dc
commit cc07c35f2a
6 files changed
+53 -13

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ const TRACK_KIND_AUDIO = 1;
const pendingUnpublishSids = new WeakMap();
/** @type {number} @description Max time to wait for a stale-track unpublish to settle before publishing anyway (defensive — an unpublish should resolve almost instantly; this only guards against a hung/never-resolving LiveKit promise blocking playback indefinitely). */
const UNPUBLISH_WAIT_TIMEOUT_MS = 1200;
const UNPUBLISH_WAIT_TIMEOUT_MS = 2500;
/** @extends {EventEmitter} */
export class FluxerAudioBridge extends EventEmitter {