mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
Fixed multiple avconvs/ffmpeg processes still staying alive
This commit is contained in:
@@ -92,6 +92,8 @@ var VoiceConnection = (function (_EventEmitter) {
|
|||||||
this.playing = false;
|
this.playing = false;
|
||||||
this.playingIntent = null;
|
this.playingIntent = null;
|
||||||
if (this.streamProc) {
|
if (this.streamProc) {
|
||||||
|
this.streamProc.stdin.pause();
|
||||||
|
this.streamProc.kill("SIGINT");
|
||||||
this.streamProc.kill();
|
this.streamProc.kill();
|
||||||
}
|
}
|
||||||
if (this.instream) {
|
if (this.instream) {
|
||||||
@@ -129,7 +131,7 @@ var VoiceConnection = (function (_EventEmitter) {
|
|||||||
if (!self.playingIntent || !self.playing) {
|
if (!self.playingIntent || !self.playing) {
|
||||||
self.setSpeaking(false);
|
self.setSpeaking(false);
|
||||||
retStream.emit("end");
|
retStream.emit("end");
|
||||||
console.log("ending 1");
|
//console.log("ending 1");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -140,7 +142,7 @@ var VoiceConnection = (function (_EventEmitter) {
|
|||||||
if (onWarning) {
|
if (onWarning) {
|
||||||
retStream.emit("end");
|
retStream.emit("end");
|
||||||
self.setSpeaking(false);
|
self.setSpeaking(false);
|
||||||
console.log("ending 2");
|
//console.log("ending 2");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
onWarning = true;
|
onWarning = true;
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ export default class VoiceConnection extends EventEmitter {
|
|||||||
this.playing = false;
|
this.playing = false;
|
||||||
this.playingIntent = null;
|
this.playingIntent = null;
|
||||||
if (this.streamProc) {
|
if (this.streamProc) {
|
||||||
|
this.streamProc.stdin.pause();
|
||||||
|
this.streamProc.kill("SIGINT");
|
||||||
this.streamProc.kill();
|
this.streamProc.kill();
|
||||||
}
|
}
|
||||||
if(this.instream){
|
if(this.instream){
|
||||||
@@ -99,7 +101,7 @@ export default class VoiceConnection extends EventEmitter {
|
|||||||
if (!self.playingIntent || !self.playing) {
|
if (!self.playingIntent || !self.playing) {
|
||||||
self.setSpeaking(false);
|
self.setSpeaking(false);
|
||||||
retStream.emit("end");
|
retStream.emit("end");
|
||||||
console.log("ending 1");
|
//console.log("ending 1");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -110,7 +112,7 @@ export default class VoiceConnection extends EventEmitter {
|
|||||||
if (onWarning) {
|
if (onWarning) {
|
||||||
retStream.emit("end");
|
retStream.emit("end");
|
||||||
self.setSpeaking(false);
|
self.setSpeaking(false);
|
||||||
console.log("ending 2");
|
//console.log("ending 2");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
onWarning = true;
|
onWarning = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user