mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
voice: properly null-check udp socket first (#2317)
This commit is contained in:
parent
513dbf2f68
commit
ef8366d189
1 changed files with 1 additions and 0 deletions
|
|
@ -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 => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue