diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-12-09 20:05:11 +0100 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-12-11 14:21:52 -0800 |
commit | 83ec33b9335a7140c1f8b46357303ff7a8122a0d (patch) | |
tree | 40bc5b049e161560e0afe6260d622277df30b2b5 /test/parallel/parallel.status | |
parent | 2f75eed1aa50ee1ce3d3cdd47bb4108ff5de4679 (diff) | |
download | android-node-v8-83ec33b9335a7140c1f8b46357303ff7a8122a0d.tar.gz android-node-v8-83ec33b9335a7140c1f8b46357303ff7a8122a0d.tar.bz2 android-node-v8-83ec33b9335a7140c1f8b46357303ff7a8122a0d.zip |
stream: fix end-of-stream for HTTP/2
HTTP/2 streams call `.end()` on themselves from their
`.destroy()` method, which might be queued (e.g. due to network
congestion) and not processed before the stream itself is destroyed.
In that case, the `_writableState.ended` property could be set before
the stream emits its `'close'` event, and never actually emits the
`'finished'` event, confusing the end-of-stream implementation so
that it wouldn’t call its callback.
This can be fixed by watching for the end events themselves using the
existing `'finish'` and `'end'` listeners rather than relying on the
`.ended` properties of the `_...State` objects.
These properties still need to be checked to know whether stream
closure was premature – My understanding is that ideally, streams
should not emit `'close'` before `'end'` and/or `'finished'`, so this
might be another bug, but changing this would require modifying tests
and almost certainly be a breaking change.
Fixes: https://github.com/nodejs/node/issues/24456
PR-URL: https://github.com/nodejs/node/pull/24926
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'test/parallel/parallel.status')
-rw-r--r-- | test/parallel/parallel.status | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index cfc4e36e9a..b45e4448d9 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -12,8 +12,6 @@ test-net-connect-options-port: PASS,FLAKY test-http2-pipe: PASS,FLAKY test-worker-syntax-error: PASS,FLAKY test-worker-syntax-error-file: PASS,FLAKY -# https://github.com/nodejs/node/issues/24456 -test-stream-pipeline-http2: PASS,FLAKY [$system==linux] |