mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +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);
|
this.connection.ssrcMap.set(+packet.d.audio_ssrc, packet.d.user_id);
|
||||||
break;
|
break;
|
||||||
case VoiceOPCodes.CLIENT_DISCONNECT:
|
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) {
|
if (streamInfo) {
|
||||||
this.connection.receiver.packets.streams.delete(packet.d.user_id);
|
this.connection.receiver.packets.streams.delete(packet.d.user_id);
|
||||||
streamInfo.stream.push(null);
|
streamInfo.stream.push(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user