summaryrefslogtreecommitdiff
path: root/src/node_http2.cc
diff options
context:
space:
mode:
authorDavid Halls <dahalls@gmail.com>2018-09-27 22:28:50 +0100
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-10-03 12:19:09 +0200
commite8121d52db76393f428cab6214cc9ce91d09d99d (patch)
treeaa064539df184f3c2eb1d808d44f7322991a5fab /src/node_http2.cc
parent2f36cb41251719b0d53940d386ab15fe016c58d5 (diff)
downloadandroid-node-v8-e8121d52db76393f428cab6214cc9ce91d09d99d.tar.gz
android-node-v8-e8121d52db76393f428cab6214cc9ce91d09d99d.tar.bz2
android-node-v8-e8121d52db76393f428cab6214cc9ce91d09d99d.zip
http2: set nghttp2_option_set_no_closed_streams
PR-URL: https://github.com/nodejs/node/pull/23134 Fixes: https://github.com/nodejs/node/issues/23116 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r--src/node_http2.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc
index 9a0cc4ae19..09662b08a4 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -98,6 +98,10 @@ Http2Scope::~Http2Scope() {
Http2Options::Http2Options(Environment* env, nghttp2_session_type type) {
nghttp2_option_new(&options_);
+ // Make sure closed connections aren't kept around, taking up memory.
+ // Note that this breaks the priority tree, which we don't use.
+ nghttp2_option_set_no_closed_streams(options_, 1);
+
// We manually handle flow control within a session in order to
// implement backpressure -- that is, we only send WINDOW_UPDATE
// frames to the remote peer as data is actually consumed by user