Skip to content

stream: pipeline should use req.abort() to destroy response#31054

Closed
ronag wants to merge 4 commits intonodejs:masterfrom
nxtedition:pipeline-response-destroy
Closed

stream: pipeline should use req.abort() to destroy response#31054
ronag wants to merge 4 commits intonodejs:masterfrom
nxtedition:pipeline-response-destroy

Conversation

@ronag
Copy link
Member

@ronag ronag commented Dec 21, 2019

destroy(err) on http response will propagate the error to the
request causing 'error' to be unexpectedly emitted. Furthermore,
response.destroy() unlike request.abort() does not _dump buffered
data.

Fixes a breaking change applied in 6480882.

Prefer res.req.abort() over res.destroy() until this situation is
clarified.

This is a bugfix and I believe it should be semver minor.

Fixes #31029.

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

Loading
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. http Issues or PRs related to the http subsystem. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream.pipeline(httpResponse, decompressStream) emits error three times

9 participants