mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
voice: resolve issue where dispatcher tried to send packets to null socket (#2317)
This commit is contained in:
@@ -242,10 +242,13 @@ class StreamDispatcher extends Writable {
|
||||
*/
|
||||
this._setSpeaking(true);
|
||||
while (repeats--) {
|
||||
if (!this.player.voiceConnection.sockets.udp) {
|
||||
this.emit('debug', 'Failed to send a packet - no UDP socket');
|
||||
}
|
||||
this.player.voiceConnection.sockets.udp.send(packet)
|
||||
.catch(e => {
|
||||
this._setSpeaking(false);
|
||||
this.emit('debug', `Failed to send a packet ${e}`);
|
||||
this.emit('debug', `Failed to send a packet - ${e}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user