mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Try to fix StreamDispatchers (#1387)
This commit is contained in:
@@ -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 = {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user