polyphony-chat / chorus

A Rust library for interacting with multiple Polyphony- and Spacebar-Compatible instances at once.
https://crates.io/crates/chorus
Mozilla Public License 2.0
16 stars 7 forks source link

Better gateway error handling #420

Closed kozabrada123 closed 1 year ago

kozabrada123 commented 1 year ago

Currently gateway errors / disconnect aren't handled at all, the gateway just silently disconnects.

Also consider:

Due to Discord's architecture, disconnects are a semi-regular event and should be expected and handled. When your app encounters a disconnect, it will typically be sent a close code which can be used to determine whether you can reconnect and Resume the session, or whether you have to start over and re-Identify.

And we currently have no good way of reconnecting.

Ideally we should have