mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
voice: fix disconnect without receiver edge case
This commit is contained in:
parent
4491b7b42a
commit
2e7094f9ea
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue