Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(WebSocketShard): always reconnect on disconnected with 1000 #8405

Merged

Conversation

SpaceEEC
Copy link
Member

Please describe the changes this PR makes and why it should be merged:

If the connection closes with a 1000 code before the shard is ready, the shard would end up in a state where it wouldn't attempt to reconnect any further.

This PR fixes this by simply always reconnecting when the connection was closed with a 1000 code.


The other case that came up internally, 1006 close codes, are already appropriately handled by the default case.
I could implement a custom one to change the debug message if that is wanted.

Status and versioning classification:

  • I know how to update typings and have done so, or typings don't need updating

@vercel
Copy link

vercel bot commented Jul 31, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
discord-js ✅ Ready (Inspect) Visit Preview Jul 31, 2022 at 3:16PM (UTC)

@Jiralite Jiralite added this to the ws v1 milestone Jul 31, 2022
@vercel vercel bot temporarily deployed to Preview July 31, 2022 15:16 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants