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: skip specified Node.js version to set keep-alive #4527

Closed

Conversation

rickyes
Copy link

@rickyes rickyes commented Nov 27, 2020

Checklist
  • npm test passes
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Related-issues have been fixed and released in Node.js v14.12.0 and v12.20.0

Refs: nodejs/node#34561 nodejs/node#35138

// Node.js >= 14.8.0 && < 14.12.0 and = 12.19.0 will set Keep-Alive Header
// Refs: https://github.com/nodejs/node/pull/34561 https://github.com/nodejs/node/pull/35138

const shouldPatchKeepAliveHeader = !semver.satisfies(process.version, '>=14.8.0 <14.12.0 || =12.19.0');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这逻辑有问题吧,在 14.12.0 之上的版本,都不应该 patch 了,交给 Node 本身来 patch

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看错了,close

@rickyes rickyes closed this Nov 27, 2020
@rickyes rickyes deleted the skip-specified-version-of-keep-alive branch November 27, 2020 09:23
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.

2 participants