1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-09-20 01:09:21 +00:00
Commit graph

15 commits

Author SHA1 Message Date
mavolin 88258b51c2 replace usage of discordapp.com with discord.com in docs 2020-11-03 10:14:53 -08:00
diamondburned 16c1658163 {,Voice}Gateway: Refactored Closing
This commit refactors both wsutil, the normal Gateway and the Voice
Gateway to have better closing behavior, which should assume less and
cover edge cases completely.
2020-10-30 11:02:37 -07:00
diamondburned 2afcd1bc87 Merge Gateway regression fixes from v1 2020-10-29 11:32:54 -07:00
diamondburned f88d4e4b1e Gateway: Fixed wsutil build fail regression 2020-10-29 11:32:30 -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
diamondburned 3312c66515 Voice: Made EventLoop a valid struct value instead of nil pointer 2020-08-19 21:32:40 -07:00
diamondburned de61fd912d wsutil: Made PacemakerLoop valid as zero-value 2020-08-19 21:30:57 -07:00
Maximilian von Lindern 32789bb6e2 *: Separate utils and internal (#129)
* Utils: move package utils/heart to internal/heart

* Utils: move package utils/moreatomic to internal/moreatomic

* Utils: move package utils/zlib to internal/zlib
2020-07-29 16:58:33 -07:00
Tadeo Kondrak d290b0d01c *: Add typed Snowflake IDs (#122)
This PR closes #120.
2020-07-29 16:58:33 -07:00
diamondburned 6717f8002c Gateway: Fixed autoreconnect misusing context 2020-07-15 16:39:40 -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
diamondburned (Forefront) 51e88a47b2 Gateway/Voice: Improved the event loop, fixed race conditions 2020-04-25 00:13:07 -07:00
diamondburned (Forefront) 3005c7b44a Voice: Separated UDP and WS into packages, added io.Writer API 2020-04-24 19:36:33 -07:00