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

Make sure RequestOptions.keepAlive is applied properly on node20 runtime #1572

Merged
merged 1 commit into from Feb 28, 2024

Conversation

teatimeguest
Copy link
Contributor

Starting with Node.js v19, http(s) globalAgent now uses keep-alive by default. The current HttpClient implementation uses globalAgent when RequestOptions.keepAlive is set to false (default), which is fine for node16 runtime but incorrect for node20.

This PR fixes HttpClient to use a custom agent regardless of RequestOptions.keepAlive so that the option works correctly on both runtimes.

@teatimeguest teatimeguest requested a review from a team as a code owner October 26, 2023 09:41
@eregon
Copy link

eregon commented Nov 7, 2023

It would be great to merge this as it would fix actions using the cache package taking an extra 2 minutes if they don't explicitly process.exit(): ruby/setup-ruby#543 (comment)

@luketomlinson luketomlinson merged commit ff435e5 into actions:main Feb 28, 2024
teatimeguest added a commit to teatimeguest/setup-texlive-action that referenced this pull request Mar 9, 2024
teatimeguest added a commit to teatimeguest/setup-texlive-action that referenced this pull request Mar 9, 2024
* build(deps): bump @actions/http-client from 2.2.0 to 2.2.1

Bumps [@actions/http-client](https://github.com/actions/toolkit/tree/HEAD/packages/http-client) from 2.2.0 to 2.2.1.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/http-client/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/http-client)

---
updated-dependencies:
- dependency-name: "@actions/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build: remove patch

Merged: actions/toolkit#1572

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: teatimeguest <teatimeguest@gmail.com>
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

3 participants