1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-09-12 13:16:42 +00:00
Commit graph

12 commits

Author SHA1 Message Date
diamondburned 6727f0e728 Voice: Fixed voice tests for new JoinChannel 2020-11-30 17:04:11 -08:00
diamondburned 1463d6e675 Voice: Rename NewVoice... to New 2020-11-30 16:46:43 -08:00
diamondburned 8356a8a3f6 Voice: Omit deprecated function in tests 2020-11-18 16:18:15 -08:00
diamondburned f4750292eb Voice: Minor concurrency improvements
This commit adds multiple thread safe guards to do better the
concurrency promises. However, it also omits completely those guarantees
in certain places that don't make sense to call concurrently. This is
mostly documented.

This commit also adds a small piece of code to concurrently run things
with the race detector.
2020-11-17 12:15:05 -08:00
Tyler 59539403b3 Voice: Implement Voice Gateway events
Speaking event patches and support Client Connect/Disconnect events.
2020-11-17 12:15:05 -08:00
diamondburned 9c1088bf7c Voice: Fixed test error caused by Gateway API changes 2020-10-29 13:27:32 -07:00
diamondburned 75df94d9f4 *: Migrated Go Modules to v2 2020-10-28 15:39:59 -07:00
diamondburned 6c332ac145 {Voice,}Gateway: Fixed various race conditions
This commit fixes race conditions in both package voice, package
voicegateway and package gateway.

Originally, several race conditions exist when both the user's and the
pacemaker's goroutines both want to do several things to the websocket
connection. For example, the user's goroutine could be writing, and the
pacemaker's goroutine could trigger a reconnection. This is racey.

This issue is partially fixed by removing the pacer loop from package
heart and combining the ticker into the event (pacemaker) loop itself.

Technically, a race condition could still be triggered with care, but
the API itself never guaranteed any of those. As events are handled
using an internal loop into a channel, a race condition will not be
triggered just by handling events and writing to the websocket.
2020-10-22 10:47:27 -07:00
Tadeo Kondrak d290b0d01c *: Add typed Snowflake IDs (#122)
This PR closes #120.
2020-07-29 16:58:33 -07:00
diamondburned edb8a46ef2 Gateway: Added intent helpers and more context API support 2020-07-11 12:50:32 -07:00
diamondburned (Forefront) 3005c7b44a Voice: Separated UDP and WS into packages, added io.Writer API 2020-04-24 19:36:33 -07:00
diamondburned (Forefront) 4cfde32531 Voice: Added an integration test 2020-04-23 20:52:12 -07:00