voice: Fix race condition, see #237

This commit is contained in:
diamondburned 2021-06-30 00:19:13 -07:00
parent d4c66d4971
commit af35c03b8e
1 changed files with 1 additions and 1 deletions

View File

@ -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()
}