Skip to content

refactor(WebSocketShard): identify throttling #8888

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

Merged
merged 8 commits into from
Dec 2, 2022

Conversation

didinele
Copy link
Member

@didinele didinele commented Nov 30, 2022

Please describe the changes this PR makes and why it should be merged:
This PR makes IContextFetchingStrategy responsible for throttling identifies.

Prior to those changes, control over not spamming identify was handed to WebSocketShard#connect's caller, which does NOT work correctly in the case of multiple shards reconnecting at the same time (e.g. there would be no regard to max_concurrency).

With this change, /sharder (see #8859) can now also get everything working even with cross-process sharding and such.

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 2, 2022 at 1:01PM (UTC)
discord-js-guide ⬜️ Ignored (Inspect) Dec 2, 2022 at 1:01PM (UTC)

@didinele didinele force-pushed the refactor/identify-throttling branch from 4fad2a3 to 62f43bf Compare December 2, 2022 13:01
@kodiakhq kodiakhq bot merged commit 8f552a0 into discordjs:main Dec 2, 2022
@didinele didinele deleted the refactor/identify-throttling branch December 2, 2022 13:04
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