Skip to content

Commit

Permalink
voice: properly null-check udp socket first (#2317)
Browse files Browse the repository at this point in the history
  • Loading branch information
amishshah committed Mar 13, 2018
1 parent 513dbf2 commit ef8366d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/client/voice/dispatcher/StreamDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit ef8366d

Please sign in to comment.