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
94cca0adca
httputil: Fixed unlock of unlocked mutex bug
2020-08-04 14:09:43 -07:00
diamondburned
77b1b08bce
Heart: Better synchronization on close methods
2020-07-30 12:44:50 -07:00
mavolin
8baf8ee84b
Multipartutil: move back to package api
2020-07-29 16:58:33 -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
Maximilian von Lindern
e1d9685cdb
API: separate token-based and bot-based interactions with webhooks ( #130 )
...
* API: separate token-based and bot-based interactions with webhooks
* API: move writeMultipart to internal/multipartutil
* Multipartutil: fix double filetype-suffix
2020-07-29 16:58:33 -07:00
diamondburned (Forefront)
be12849668
Changed internal/ to utils/, allowing external imports
2020-04-08 19:28:40 -07:00
diamondburned (Forefront)
5750876348
Gateway: Fixed a race condition related to concurrent WS writes
2020-04-06 14:03:08 -07:00
diamondburned (Forefront)
9f5c2ac958
Gateway: Switched to gorilla/websocket, fixes #11
2020-04-06 13:27:29 -07:00
diamondburned (Forefront)
0aebea60bd
Gateway: Minor bug fixes
2020-03-01 16:39:40 -08:00
diamondburned (Forefront)
14b9d8f43a
API: Fixed unlock of unlocked mutex bug
2020-03-01 14:25:54 -08:00
diamondburned
76c7760c24
Gateway: Removed redundant context
2020-02-11 09:29:30 -08:00
diamondburned
ff6669a58d
internal/wsutil: Fixed error checking
2020-02-11 09:23:42 -08:00
diamondburned (Forefront)
f33dc2ee75
API: Fixed major rate limiters not working
2020-02-09 12:54:16 -08:00
diamondburned
3288f2d19c
Gateway: Fix race conditions and fatal reconnecting ( #7 )
2020-02-07 22:17:27 -08:00
diamondburned (Forefront)
85b793a1a7
Fixed some race conditions
2020-02-02 14:12:54 -08:00
diamondburned (Forefront)
b62ba3ecc0
More race condition fixes
2020-01-28 19:54:22 -08:00
diamondburned (Forefront)
7e73f00eb9
Fixed bug where ParseContent interface methods won't return a proper error
2020-01-20 20:25:47 -08:00
diamondburned (Forefront)
73f5cdec9e
Added HTTP retry, fixed async JSON body corrupting
2020-01-20 11:28:55 -08:00
diamondburned (Forefront)
3ca1d352c9
Fixed a ridiculous race condition in the gateway
2020-01-20 03:06:20 -08:00
diamondburned (Forefront)
27e315ca66
Fixed bug where message state would screw up
2020-01-20 00:53:23 -08:00
diamondburned (Forefront)
9651de81c6
Heartbeat can now resume, bot will fatal (die) if it can't reconnect
2020-01-18 22:14:46 -08:00
diamondburned (Forefront)
189853de32
Removed test for removed function
2020-01-18 19:15:23 -08:00
diamondburned (Forefront)
05c8932166
Fixed SendComplex
2020-01-18 19:12:08 -08:00
diamondburned (Forefront)
e98c533114
MeanwhileBody tests
2020-01-18 18:27:30 -08:00
diamondburned
2dc983d243
Added simple example
2020-01-17 14:29:13 -08:00
diamondburned (Forefront)
deafe15967
Moved internal/handler outside
2020-01-16 21:23:56 -08:00
diamondburned (Forefront)
cfa764b150
Fixed unit tests
2020-01-16 21:20:09 -08:00
diamondburned (Forefront)
d627690835
Added session, started state
2020-01-16 21:17:46 -08:00
diamondburned (Forefront)
478b66fffa
Merge branch 'master' of ssh://github.com/diamondburned/arikawa
2020-01-15 20:44:30 -08:00
diamondburned (Forefront)
ef0dd9beef
Added API integration tests
2020-01-15 20:44:11 -08:00
diamondburned
d1341b61b3
Gateway integration test + Bug fixes
2020-01-15 19:28:21 -08:00
diamondburned
127c636310
Moved misc packages to internal
2020-01-15 10:32:54 -08:00