mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 12:40:50 +00:00
fix epipe when skipping songs, probably fixes econnreset (#662)
This commit is contained in:
parent
a5dfa08777
commit
47a164bd36
1 changed files with 2 additions and 1 deletions
|
|
@ -27,7 +27,8 @@ class VoiceConnectionPlayer extends EventEmitter {
|
||||||
|
|
||||||
convertStream(stream) {
|
convertStream(stream) {
|
||||||
const encoder = this.converterEngine.createConvertStream();
|
const encoder = this.converterEngine.createConvertStream();
|
||||||
stream.pipe(encoder.stdin);
|
const pipe = stream.pipe(encoder.stdin);
|
||||||
|
pipe.on('unpipe', () => pipe.destroy());
|
||||||
this.processMap.set(encoder.stdout, {
|
this.processMap.set(encoder.stdout, {
|
||||||
pcmConverter: encoder,
|
pcmConverter: encoder,
|
||||||
inputStream: stream,
|
inputStream: stream,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue