Skip to content

Commit

Permalink
fix: deal with node v19 breaking change (keep-alive enabled on global…
Browse files Browse the repository at this point in the history
… agent)
  • Loading branch information
stefan-guggisberg committed Jun 7, 2024
1 parent 1bf0ca6 commit de200ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/h1.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const getAgent = (ctx, protocol) => {
// use default (global) agent
/* c8 ignore next 13 */
/* => code coverage depends on the node version */
if (https.globalAgent.keepAlive) /* node >= 19 */ {
if (http.globalAgent.keepAlive) /* node >= 19 */ {
// As of Node.js v19 the global agent has keep-alive enabled by default:
// https://nodejs.org/api/http.html#class-httpagent
// https://github.com/nodejs/node/issues/37184
Expand Down

0 comments on commit de200ba

Please sign in to comment.