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 8c8961d commit 0fb816dCopy full SHA for 0fb816d
src/node_http2.cc
@@ -528,6 +528,12 @@ Http2Session::Http2Session(Http2State* http2_state,
528
Http2Session::~Http2Session() {
529
CHECK(!is_in_scope());
530
Debug(this, "freeing nghttp2 session");
531
+ // Ensure that all `Http2Stream` instances and the memory they hold
532
+ // on to are destroyed before the nghttp2 session is.
533
+ for (const auto& [id, stream] : streams_) {
534
+ stream->Detach();
535
+ }
536
+ streams_.clear();
537
// Explicitly reset session_ so the subsequent
538
// current_nghttp2_memory_ check passes.
539
session_.reset();
0 commit comments