mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
Better ending
This commit is contained in:
@@ -103,10 +103,11 @@ class StreamDispatcher extends Writable {
|
|||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
if (this.player.dispatcher !== this) return;
|
if (this.player.dispatcher !== this) return;
|
||||||
|
this.player.dispatcher = null;
|
||||||
const streams = this.player.streams;
|
const streams = this.player.streams;
|
||||||
|
this.end();
|
||||||
if (streams.opus) streams.opus.unpipe(this);
|
if (streams.opus) streams.opus.unpipe(this);
|
||||||
if (streams.ffmpeg) streams.ffmpeg.destroy();
|
if (streams.ffmpeg) streams.ffmpeg.destroy();
|
||||||
this.end();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user