You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As title says. I have a bot that is connected to voice and is actively processing audio from Discord via ReadPacket(), it appears a race condition is possible with it when the voice region changes:
==================
WARNING: DATA RACE
Write at 0x00c000020170 by goroutine 87:
github.com/diamondburned/arikawa/v2/voice.(*Session).reconnectCtx()
/home/jason/.go/pkg/mod/github.com/diamondburned/arikawa/v2@v2.1.0/voice/session.go:244 +0x4f8
github.com/diamondburned/arikawa/v2/voice.(*Session).updateServer()
/home/jason/.go/pkg/mod/github.com/diamondburned/arikawa/v2@v2.1.0/voice/session.go:124 +0x4c5
github.com/diamondburned/arikawa/v2/voice.(*Session).updateServer-fm()
/home/jason/.go/pkg/mod/github.com/diamondburned/arikawa/v2@v2.1.0/voice/session.go:95 +0x54
runtime.call16()
/home/jason/go/src/runtime/asm_amd64.s:550 +0x3d
reflect.Value.Call()
/home/jason/go/src/reflect/value.go:337 +0xd8
github.com/diamondburned/arikawa/v2/utils/handler.handler.call()
/home/jason/.go/pkg/mod/github.com/diamondburned/arikawa/v2@v2.1.0/utils/handler/handler.go:259 +0x1c4
Previous read at 0x00c000020170 by main goroutine:
github.com/diamondburned/arikawa/v2/voice.(*Session).ReadPacket()
/home/jason/.go/pkg/mod/github.com/diamondburned/arikawa/v2@v2.1.0/voice/session.go:377 +0x64
github.com/tmpim/tmpvoice/commands/quotes.(*QuoteState).Worker()
/home/jason/Douki/tmpvoice/commands/quotes/audio.go:50 +0x4f
main.main()
/home/jason/Douki/tmpvoice/main.go:172 +0x1396
Goroutine 87 (running) created at:
github.com/diamondburned/arikawa/v2/utils/handler.(*Handler).Call()
/home/jason/.go/pkg/mod/github.com/diamondburned/arikawa/v2@v2.1.0/utils/handler/handler.go:60 +0x37e
github.com/diamondburned/arikawa/v2/internal/handleloop.(*Loop).Start.func1()
/home/jason/.go/pkg/mod/github.com/diamondburned/arikawa/v2@v2.1.0/internal/handleloop/handleloop.go:35 +0x96
==================
The text was updated successfully, but these errors were encountered:
1lann
changed the title
Data race when connected to voice chat and region changes
Voice: v2: Data race when receiving audio packets and region changes
Jun 30, 2021
As title says. I have a bot that is connected to voice and is actively processing audio from Discord via
ReadPacket()
, it appears a race condition is possible with it when the voice region changes:The text was updated successfully, but these errors were encountered: