diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-02-13 01:23:50 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-03-15 12:53:13 +0100 |
commit | 67f1d76956a8a5da9875b113371c8786ad579086 (patch) | |
tree | 220df0ab56ebc499c1edec20fe7b90449189d44b /src/node_http2.cc | |
parent | f7f1437d44f3e4b745e36540a752065cc58d993b (diff) | |
download | android-node-v8-67f1d76956a8a5da9875b113371c8786ad579086.tar.gz android-node-v8-67f1d76956a8a5da9875b113371c8786ad579086.tar.bz2 android-node-v8-67f1d76956a8a5da9875b113371c8786ad579086.zip |
src: introduce native-layer stream piping
Provide a way to create pipes between native `StreamBase` instances
that acts more directly than a `.pipe()` call would.
PR-URL: https://github.com/nodejs/node/pull/18936
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r-- | src/node_http2.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc index 8dd222a692..d6df93cf38 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -1813,7 +1813,9 @@ inline void Http2Stream::Close(int32_t code) { } int Http2Stream::DoShutdown(ShutdownWrap* req_wrap) { - CHECK(!this->IsDestroyed()); + if (IsDestroyed()) + return UV_EPIPE; + { Http2Scope h2scope(this); flags_ |= NGHTTP2_STREAM_FLAG_SHUT; |