From 30b69eab9302bf17775a403830a024b03b8505c2 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 a82cb66..30e7c3c 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() }