mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
test
This commit is contained in:
1 parent
b75ea56ca9
commit
d53cfd88d6
2 files changed
+34
-5
No files matched your search
@@ -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 (_) {}
|
||||
|
||||
Reference in new issue
Block a user