1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-05 06:26:08 +00:00
Commit graph

13 commits

Author SHA1 Message Date
diamondburned d1242fc39a Voice: Remove Session from repository before disconnecting
This commit introduces this change so that Voice can be called from
other threads without waiting for one Session to disconnect itself.
2020-11-17 11:01:34 -08:00
diamondburned f85aac09be Voice: Added intent adders into constructor 2020-11-12 18:55:05 -08: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
mavolin 41ce1f389e
make all error messages lowercase 2020-05-16 23:14:49 +02:00
Matthew Penner 3aa92c8f05 Only add the guild to SessionErrors if the error is not nil 2020-05-13 15:38:07 -06:00
Matthew Penner 60346f23bb Close voice connections when Close() is called 2020-05-13 14:43:00 -06:00
diamondburned (Forefront) cc153e1715 Voice: Updated package description 2020-04-24 20:29:14 -07:00
diamondburned (Forefront) 3005c7b44a Voice: Separated UDP and WS into packages, added io.Writer API 2020-04-24 19:36:33 -07:00
Matthew Penner 6a029e0c80 Improvements to the way voice waits for events 2020-04-21 16:37:22 -06:00
Matthew Penner f429010ded Add janky voice support 2020-04-21 16:37:22 -06:00