Discord-Net-Labs / Discord.Net-Labs

An experimental fork of Discord.Net that implements the newest discord features for testing and development to eventually get merged into Discord.Net
https://labs.discordnet.dev
MIT License
156 stars 42 forks source link

Reconnection error #257

Closed csmir closed 3 years ago

csmir commented 3 years ago

View

Caused by the frequent reconnection attempts in ConnectionManager.cs. This error has persisted as long as I have used Discord.NET, are there any options to resolve this?

quinchs commented 3 years ago

via Jake#1 (Discord Staff) on the "Discord API" discord: [~April 3]

Discord is rolling out a software update to our gateways. We anticipate no issues, and have had a canary of the new code running for a while now with no issue. This update introduces only one user visible change.

Your gateway connection will regularly be asked to reconnect using opcode: https://discordapp.com/developers/docs/topics/gateway#reconnect

You can simply reconnect and resume as you would tolerate the gateway connection being interrupted via other causes. We are doing this to allow for organic rebalancing of long-lived connections between nodes as nodes eventually start to auto-scale in/out

Via above documentation link:

Reconnect The reconnect event is dispatched when a client should reconnect to the gateway (and resume their existing session, if they have one). This event usually occurs during deploys to migrate sessions gracefully off old hosts.

To put it simply, discord is asking your bot to reconnect to the gateway, theres nothing we can really do on the lib end for that besides reconnect you

th0mk commented 3 years ago

Shouldn't the log level be lowered then? If this is expected behavior it shouldn't be logged as an error.