mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 15:11:32 +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() {
|
||||
if (this.player.dispatcher !== this) return;
|
||||
this.player.dispatcher = null;
|
||||
const streams = this.player.streams;
|
||||
this.end();
|
||||
if (streams.opus) streams.opus.unpipe(this);
|
||||
if (streams.ffmpeg) streams.ffmpeg.destroy();
|
||||
this.end();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue