Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-01-09 21:31:05 +0300
committerRich Trott <rtrott@gmail.com>2020-01-12 01:02:31 +0300
commita52328310c2c7a399a701c8c78dc4f1fda654c95 (patch)
tree8b24eb89f524602bd2ed00baad0ef12642cb2470 /src/node_http2.cc
parent2a94c9fa6a434f44d0941431b975f617cfe43152 (diff)
http2: skip creating native ShutdownWrap
`ShutdownWrap` instances are being used to carry context between the start and the asynchronous end of shutting down the writable side of a `StreamBase`. HTTP/2 streams always perform this action synchronously, so no such object is necessary. PR-URL: https://github.com/nodejs/node/pull/31283 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r--src/node_http2.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc
index a56f0ebccf7..e0d6398f2a4 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -1979,6 +1979,12 @@ void Http2Stream::Close(int32_t code) {
Debug(this, "closed with code %d", code);
}
+ShutdownWrap* Http2Stream::CreateShutdownWrap(v8::Local<v8::Object> object) {
+ // DoShutdown() always finishes synchronously, so there's no need to create
+ // a structure to store asynchronous context.
+ return nullptr;
+}
+
int Http2Stream::DoShutdown(ShutdownWrap* req_wrap) {
if (IsDestroyed())
return UV_EPIPE;