1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-30 18:53:30 +00:00

voice: Fix race condition, see #237

This commit is contained in:
diamondburned 2021-06-30 00:19:13 -07:00
parent d4c66d4971
commit af35c03b8e

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