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: don't deadlock on aborted stream #29376

Closed
wants to merge 4 commits into from

Conversation

@ronag
Copy link
Contributor

commented Aug 30, 2019

Not all streams (e.g. http.ClientRequest) will always emit 'close' after 'aborted'.

Noticed this while fixing some stuff in fastify. I think the root issue will be fixed by #27984. But I still think it's a good idea to have this fix/workaround in the npm stream-readable package for older node versions.

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
stream: don't deadlock on aborted stream
Not all streams (e.g. http.ClientRequest) will always emit
'close' after 'aborted'.
@ronag

This comment has been minimized.

Copy link
Contributor Author

commented Aug 30, 2019

ping @mcollina

@mcollina
Copy link
Member

left a comment

LGTM

@nodejs-github-bot

This comment has been minimized.

@lpinca
lpinca approved these changes Aug 30, 2019
ronag added 2 commits Aug 31, 2019
@nodejs-github-bot

This comment has been minimized.

@mcollina

This comment has been minimized.

Copy link
Member

commented Sep 2, 2019

Landed in 897587c

@mcollina mcollina closed this Sep 2, 2019

mcollina added a commit that referenced this pull request Sep 2, 2019
stream: don't deadlock on aborted stream
Not all streams (e.g. http.ClientRequest) will always emit
'close' after 'aborted'.

PR-URL: #29376
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
BridgeAR added a commit that referenced this pull request Sep 3, 2019
stream: don't deadlock on aborted stream
Not all streams (e.g. http.ClientRequest) will always emit
'close' after 'aborted'.

PR-URL: #29376
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@BridgeAR BridgeAR referenced this pull request Sep 3, 2019
BridgeAR added a commit that referenced this pull request Sep 4, 2019
stream: don't deadlock on aborted stream
Not all streams (e.g. http.ClientRequest) will always emit
'close' after 'aborted'.

PR-URL: #29376
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
stream: don't deadlock on aborted stream
Not all streams (e.g. http.ClientRequest) will always emit
'close' after 'aborted'.

PR-URL: nodejs#29376
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
JeniaBR added a commit to JeniaBR/node that referenced this pull request Sep 11, 2019
stream: don't deadlock on aborted stream
Not all streams (e.g. http.ClientRequest) will always emit
'close' after 'aborted'.

PR-URL: nodejs#29376
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.