mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
Try to fix StreamDispatchers (#1387)
This commit is contained in:
parent
88aa947376
commit
2e33bf583e
1 changed files with 5 additions and 1 deletions
|
|
@ -73,7 +73,11 @@ class AudioPlayer extends EventEmitter {
|
|||
const transcoder = this.transcoder;
|
||||
const dispatcher = this.dispatcher;
|
||||
if (transcoder) transcoder.kill();
|
||||
if (dispatcher) dispatcher.destroy('end');
|
||||
if (dispatcher) {
|
||||
dispatcher.removeListener('end', dispatcher.listeners('end')[0]);
|
||||
dispatcher.removeListener('error', dispatcher.listeners('error')[0]);
|
||||
dispatcher.destroy('end');
|
||||
}
|
||||
this.currentStream = {};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue