This commit is contained in:
NoLogicAlan committed 2026-05-16 18:34:00 +03:00
1 parent b75ea56ca9
commit d53cfd88d6
2 files changed
+34 -5

No files matched your search

+7
View File
@@ -1365,6 +1365,13 @@ export default class Player extends EventEmitter {
const connToDestroy = this.connection;
this.connection = null;
this._mediaPlayer = null;
// Mark the disconnect as intentional BEFORE disconnecting so that
// the RoomEvent.Disconnected handler in FluxerRevoice (and the
// VoiceState bot-disconnect handler in GatewayHandler) do NOT treat
// this as an unexpected drop and schedule a spurious rejoin.
if (this._revoice && this._channelId) {
try { this._revoice.markIntentionalDisconnect(this._channelId); } catch (_) {}
}
this._stopMediaPlayer().catch(() => {}).then(() => {
if (connToDestroy) {
try { connToDestroy.removeAllListeners?.(); } catch (_) {}