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

Feat: Abort Requests that takes a lot of time to resolve #3327

Merged
merged 10 commits into from Aug 19, 2019
Merged

Feat: Abort Requests that takes a lot of time to resolve #3327

merged 10 commits into from Aug 19, 2019

Conversation

Deivu
Copy link
Contributor

@Deivu Deivu commented Jun 5, 2019

Please describe the changes this PR makes and why it should be merged:
Lately I suffered from some requests that gets too long to resolve, and due to this, our bot slowed down a lot, as well causing us some problems specially in some of our modules. By adding a request timeout feature for Discord.js requests, we can make sure that requests that takes too long to resolve could get cancelled, hence solving the problem of requests that takes an inconsiderable amount of time to resolve.

Status

  • 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

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

src/rest/APIRequest.js Outdated Show resolved Hide resolved
src/rest/APIRequest.js Outdated Show resolved Hide resolved
@Deivu
Copy link
Contributor Author

Deivu commented Jun 6, 2019

Updated as per reviewed.

src/rest/APIRequest.js Outdated Show resolved Hide resolved
src/rest/APIRequest.js Outdated Show resolved Hide resolved
@SpaceEEC SpaceEEC merged commit e4309b2 into discordjs:master Aug 19, 2019
samsamson33 pushed a commit to samsamson33/discord.js that referenced this pull request Feb 27, 2020
)

* Add Request Timeout

* Add abort controller in packages

* Fix Lint Error.

* Fix Lint Errors

* Make Timeout Customizable & use finally

* Fixed a minor issue

* Fix eslint

* Update request timeout to use d.js client timeout methods.
samsamson33 added a commit to samsamson33/discord.js that referenced this pull request Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants