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): send ratelimit handling #8887

Merged
merged 4 commits into from
Dec 1, 2022

Conversation

didinele
Copy link
Member

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

Refer to #8558 (comment) for an explanation of the actual underlying problem.

Also related: #8399, #8405, #8479, #8731

All in all, this PR:

  1. fixes a bad condition with the ratelimit resetAt check
  2. accounts for some edge cases related to a connection being destroyed while a payload is being sent out
  3. adds some more debug logs that were much needed for fixing this issue
  4. adds a new close event that's needed for some of the new internal behavior - making this as semver minor PR

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)

@vercel
Copy link

vercel bot commented Nov 30, 2022

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

2 Ignored Deployments
Name Status Preview Updated
discord-js ⬜️ Ignored (Inspect) Dec 1, 2022 at 10:54AM (UTC)
discord-js-guide ⬜️ Ignored (Inspect) Dec 1, 2022 at 10:54AM (UTC)

Copy link
Member

@SpaceEEC SpaceEEC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@Jiralite Jiralite added this to the ws v0.6 milestone Nov 30, 2022
@kodiakhq kodiakhq bot merged commit 40b504a into discordjs:main Dec 1, 2022
@didinele didinele deleted the fix/ws-send branch December 1, 2022 12:42
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.

WebSocketManager disconnects 30-60 minutes at a time
6 participants