mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
voice: properly null-check udp socket first (#2317)
This commit is contained in:
@@ -242,6 +242,7 @@ class StreamDispatcher extends Writable {
|
||||
while (repeats--) {
|
||||
if (!this.player.voiceConnection.sockets.udp) {
|
||||
this.emit('debug', 'Failed to send a packet - no UDP socket');
|
||||
return;
|
||||
}
|
||||
this.player.voiceConnection.sockets.udp.send(packet)
|
||||
.catch(e => {
|
||||
|
||||
Reference in New Issue
Block a user