mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Catch udp close errors
This commit is contained in:
@@ -94,8 +94,6 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||
if (this.KAI) {
|
||||
clearInterval(this.KAI);
|
||||
}
|
||||
this.vWS.close();
|
||||
this.udp.close();
|
||||
this.client.internal.sendWS({
|
||||
op: 4,
|
||||
d: {
|
||||
@@ -106,6 +104,12 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||
}
|
||||
});
|
||||
this.client.internal.voiceConnections.remove(this);
|
||||
try {
|
||||
this.vWS.close();
|
||||
} catch (e) {}
|
||||
try {
|
||||
this.udp.close();
|
||||
} catch (e) {}
|
||||
};
|
||||
|
||||
VoiceConnection.prototype.stopPlaying = function stopPlaying() {
|
||||
|
||||
Reference in New Issue
Block a user