mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 09:42:22 +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);
|
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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue