-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
stream: add closed property #33990
stream: add closed property #33990
Conversation
fs streams already have a closed property. This PR standardized it and brings it inline with rest of streams.
@nodejs/streams |
@@ -199,7 +199,7 @@ const rangeFile = fixtures.path('x.txt'); | |||
file.on('error', common.mustCall()); | |||
|
|||
process.on('exit', function() { | |||
assert(!file.closed); | |||
assert(file.closed); |
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.
brings this inline with autoDestroy enabled by default
@@ -271,7 +271,7 @@ if (!common.isWindows) { | |||
file.on('error', common.mustCall()); | |||
|
|||
process.on('exit', function() { | |||
assert(!file.closed); | |||
assert(file.closed); |
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.
brings this inline with autoDestroy enabled by default
Might want to consider making this semver-major due to the changes in fs. Not sure. |
Needs a CI |
At least semver-minor, I assume. |
Giving this more thought... I'm actually a little unsure about this PR... when is |
Unless someone has further comments on what I wrote above I think I'm going to close this until we have a better reason to add this property. |
I would close this. |
Closing, we can always re-open if we want |
fs streams already have a closed property. This PR standardized
it and brings it inline with rest of streams.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes