From af35c03b8e77dcdfb3084ead7b0b692945d5b6cd Mon Sep 17 00:00:00 2001 From: diamondburned Date: Wed, 30 Jun 2021 00:19:13 -0700 Subject: [PATCH] voice: Fix race condition, see #237 --- voice/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voice/session.go b/voice/session.go index 70287b1..4790427 100644 --- a/voice/session.go +++ b/voice/session.go @@ -374,5 +374,5 @@ func (s *Session) ensureClosed() { // thread safe, and must be used very carefully. The backing buffer is always // reused. func (s *Session) ReadPacket() (*udp.Packet, error) { - return s.voiceUDP.ReadPacket() + return s.VoiceUDPConn().ReadPacket() }