Skip to content

Commit

Permalink
Try to fix StreamDispatchers (#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
amishshah committed Apr 29, 2017
1 parent b829686 commit d85695e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/voice/player/AudioPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
}

Expand Down

0 comments on commit d85695e

Please sign in to comment.