-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
http,https,http2: make async disposers idempotent #58832
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
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
@@ -580,10 +578,6 @@ Server.prototype.close = function close() { | |||
return this; | |||
}; | |||
|
|||
Server.prototype[SymbolAsyncDispose] = assignFunctionName(SymbolAsyncDispose, async function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm does this make this a semver-major? This becomes a user observable change and if someone happens to be using an ERM polyfill I can imagine removing this breaking things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I forgot that disposers graduated from experimental state since v24.2.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to split this into two patches, one to make the existing http* overrides idempotent, and another semver-major one to remove them?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58832 +/- ##
==========================================
- Coverage 90.09% 90.08% -0.02%
==========================================
Files 640 640
Lines 188271 188356 +85
Branches 36923 36940 +17
==========================================
+ Hits 169625 169675 +50
- Misses 11386 11402 +16
- Partials 7260 7279 +19
🚀 New features to boost your workflow:
|
This PR makes
server[Symbol.asyncDispose]
calls not throw after the server is already closed.