We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f0f96b commit 3bd39fbCopy full SHA for 3bd39fb
src/node_http2.cc
@@ -605,6 +605,12 @@ Http2Session::Http2Session(Http2State* http2_state,
605
Http2Session::~Http2Session() {
606
CHECK(!is_in_scope());
607
Debug(this, "freeing nghttp2 session");
608
+ // Ensure that all `Http2Stream` instances and the memory they hold
609
+ // on to are destroyed before the nghttp2 session is.
610
+ for (const auto& [id, stream] : streams_) {
611
+ stream->Detach();
612
+ }
613
+ streams_.clear();
614
// Explicitly reset session_ so the subsequent
615
// current_nghttp2_memory_ check passes.
616
session_.reset();
0 commit comments