shuppet / raku-api-discord

Raku module for interacting with the Discord API.
https://shuppet.com
BSD 3-Clause "New" or "Revised" License
30 stars 3 forks source link

Reconnect doesn't work #41

Closed Altreus closed 4 years ago

Altreus commented 4 years ago

Whenever we don't receive a heartbeat we should reconnect.

On the branch refactor-comms I have introduced a WebSocket class, whose job it is to marshal WS messages into the main Connection class. This is supposed to use a migrating Supply so that when a reconnection takes place, the WS class simply emits a new message supply, and the rest of the code should continue.

It appears that it:

I am unable to prove that this is not my fault - mostly because it probably is. It's hard to believe that Discord is doing it wrong. But I cannot ascertain what part of the mechanism is failing.

It would be good to have #40 going, so that we can use a fake Discord to force the disconnection.