1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-01-09 21:47:07 +00:00

voice: Fix race condition, see #237

This commit is contained in:
diamondburned 2021-06-30 00:19:13 -07:00
parent 26c06802d8
commit 30b69eab93

View file

@ -374,5 +374,5 @@ func (s *Session) ensureClosed() {
// thread safe, and must be used very carefully. The backing buffer is always // thread safe, and must be used very carefully. The backing buffer is always
// reused. // reused.
func (s *Session) ReadPacket() (*udp.Packet, error) { func (s *Session) ReadPacket() (*udp.Packet, error) {
return s.voiceUDP.ReadPacket() return s.VoiceUDPConn().ReadPacket()
} }