From 0c2b0eccf4dbd590dea04443721c26d2e5ea8ca7 Mon Sep 17 00:00:00 2001 From: ozraru <34647405+ozraru@users.noreply.github.com> Date: Mon, 24 Oct 2022 07:44:08 +0900 Subject: [PATCH] Continue to next packet if received broken packet (#1260) Broken packet should be ignored and continue to next packet. This goroutine should not exit until close. --- voice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voice.go b/voice.go index efd8809..04fa8ec 100644 --- a/voice.go +++ b/voice.go @@ -835,7 +835,7 @@ func (v *VoiceConnection) opusReceiver(udpConn *net.UDPConn, close <-chan struct if opus, ok := secretbox.Open(nil, recvbuf[12:rlen], &nonce, &v.op4.SecretKey); ok { p.Opus = opus } else { - return + continue } // extension bit set, and not a RTCP packet