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

stream: finished should complete with read-only Duplex #32967

Closed
wants to merge 3 commits into from

Conversation

ronag
Copy link
Member

@ronag ronag commented Apr 21, 2020

If passed a Duplex where readable or writable has been
explicitly disabled then don't assume 'close' will be
emitted.

Fixes: #32965

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@ronag ronag requested a review from mafintosh April 21, 2020 10:41
@ronag ronag added the stream Issues and PRs related to the stream subsystem. label Apr 21, 2020
If passed a Duplex where readable or writable has been
explicitly disabled then don't assume 'close' will be
emitted.

Fixes: nodejs#32965
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm.

Should this go into 12, 13, 14?

@ronag ronag added the v14.x label Apr 21, 2020
@ronag
Copy link
Member Author

ronag commented Apr 21, 2020

Should this go into 12, 13, 14?

14

@nodejs-github-bot
Copy link
Collaborator

@mafintosh
Copy link
Member

mafintosh commented Apr 21, 2020

@ronag mind adding an additional test, same as the one you have but where you call .end() just before finished instead of just after also?

@ronag
Copy link
Member Author

ronag commented Apr 21, 2020

@ronag mind adding an additional test, same as the one you have but where you call .end() just before finished instead of just after also?

@mafintosh Good spot. PTAL.

@nodejs-github-bot
Copy link
Collaborator

@mcollina
Copy link
Member

@nodejs/tsc it would be good to fast-track this to v14 as well.

@mafintosh
Copy link
Member

@ronag lgtm

@ronag ronag added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 21, 2020
@ronag
Copy link
Member Author

ronag commented Apr 23, 2020

Landed in 4eb1701

@ronag ronag closed this Apr 23, 2020
ronag added a commit that referenced this pull request Apr 23, 2020
If passed a Duplex where readable or writable has been
explicitly disabled then don't assume 'close' will be
emitted.

Fixes: #32965

PR-URL: #32967
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mathias Buus <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
ronag added a commit to nxtedition/node that referenced this pull request Apr 23, 2020
An unfortunate overlap between two PR that by themselves pass
CI but together pass a test.

nodejs#32967 changes so that
pipeline does not wait for 'close'.

nodejs#32968 changed so that
all streams are not destroyed.

Which made one test fail when expected the stream to be
destroyed during pipeline callback.
@ronag ronag mentioned this pull request Apr 23, 2020
4 tasks
BridgeAR pushed a commit that referenced this pull request Apr 23, 2020
An unfortunate overlap between two PR that by themselves pass
CI but together pass a test.

#32967 changes so that
pipeline does not wait for 'close'.

#32968 changed so that
all streams are not destroyed.

Which made one test fail when expected the stream to be
destroyed during pipeline callback.

PR-URL: #33030
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
BethGriggs pushed a commit that referenced this pull request Apr 27, 2020
If passed a Duplex where readable or writable has been
explicitly disabled then don't assume 'close' will be
emitted.

Fixes: #32965

PR-URL: #32967
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mathias Buus <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
BethGriggs pushed a commit that referenced this pull request Apr 27, 2020
An unfortunate overlap between two PR that by themselves pass
CI but together pass a test.

#32967 changes so that
pipeline does not wait for 'close'.

#32968 changed so that
all streams are not destroyed.

Which made one test fail when expected the stream to be
destroyed during pipeline callback.

PR-URL: #33030
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stream.finished readonly doesn't fire if writable side is open
7 participants