mirror of
https://github.com/danbulant/discord.js
synced 2026-07-07 04:00:42 +00:00
Better ending
This commit is contained in:
parent
48452173ca
commit
7f90d4ebc5
1 changed files with 2 additions and 1 deletions
|
|
@ -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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue