Closed christopher-dG closed 6 years ago
Should probably open an issue in HTTP.jl to make sure it's not a problem from our side.
👍 I just want to get rid of any possibility that it's my own bug in the synchronization first.
Okay so we have a bit of a dilemma:
The problem here is caused by MbedTLS at 0.6.3. The latest version is 0.6.5, and the requests return consistently on that version. But the reason we're at 0.6.3 is that newer versions have an issue with the gateway that basically causes events to constantly lag behind by one. For example, if I start typing in a channel, you don't receive a TypingStart
until I send the message. Then when I start typing again, you get the MessageCreate
that you should have gotten before, and so on.
I'll try to put together a bug report for MbedTLS, and keep trying different versions in the meantime.
TLDR: HTTP requests don't work properly on MbedTLS 0.6.3, and the gateway connection doesn't work properly on newer versions.
With code like this:
It's somewhat common to see a deadlock where one request grabs the rate limiter bucket lock and makes the request, then hangs, which holds up all the other requests. I've seen the requests go though after a few minutes of waiting which is weird (and I've confirmed that Discord's rate limiting has nothing to do with it). The really weird bit is that the request actually does reach Discord, i.e. a message is created, but the request still doesn't return. So I'm inclined to think that this could be a bug with HTTP.jl.