mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
voice: fix disconnect without receiver edge case
This commit is contained in:
@@ -180,7 +180,7 @@ class VoiceWebSocket extends EventEmitter {
|
||||
this.connection.ssrcMap.set(+packet.d.audio_ssrc, packet.d.user_id);
|
||||
break;
|
||||
case VoiceOPCodes.CLIENT_DISCONNECT:
|
||||
const streamInfo = this.connection.receiver.packets.streams.get(packet.d.user_id);
|
||||
const streamInfo = this.connection.receiver && this.connection.receiver.packets.streams.get(packet.d.user_id);
|
||||
if (streamInfo) {
|
||||
this.connection.receiver.packets.streams.delete(packet.d.user_id);
|
||||
streamInfo.stream.push(null);
|
||||
|
||||
Reference in New Issue
Block a user