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: ref delay for rate limited requests #7239

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

suneettipirneni
Copy link
Member

@suneettipirneni suneettipirneni commented Jan 10, 2022

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

Closes #7235

The request handler relied on awaiting delay here:

This works if this isn't the only code left after the event loop finishes. However if there is no other code left and the program always ends up on awaiting the delay, it will never actually await because it's been unref'd.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes

@iCrawl iCrawl added this to the rest v1 milestone Jan 10, 2022
@iCrawl iCrawl merged commit ed0cfd9 into discordjs:main Jan 10, 2022
@suneettipirneni suneettipirneni deleted the fix/ref-delay branch February 7, 2022 16:25
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.

Process finishes before all promises resolve if not kept alive
6 participants