Skip to content

Commit

Permalink
Revert "src: let http2 streams end after session close"
Browse files Browse the repository at this point in the history
This reverts commit dee882e.

As it's causing: nodejs#46234.
nodejs#42713 to be reopened.
  • Loading branch information
santigimeno committed Jan 18, 2023
1 parent 3225498 commit 1fb348c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 60 deletions.
11 changes: 0 additions & 11 deletions src/node_http2.cc
Expand Up @@ -1124,17 +1124,6 @@ int Http2Session::OnStreamClose(nghttp2_session* handle,
if (!stream || stream->is_destroyed())
return 0;

// Don't close synchronously in case there's pending data to be written. This
// may happen when writing trailing headers.
if (code == NGHTTP2_NO_ERROR && nghttp2_session_want_write(handle) &&
env->can_call_into_js()) {
env->SetImmediate([handle, id, code, user_data](Environment* env) {
OnStreamClose(handle, id, code, user_data);
});

return 0;
}

stream->Close(code);

// It is possible for the stream close to occur before the stream is
Expand Down
49 changes: 0 additions & 49 deletions test/parallel/test-http2-trailers-after-session-close.js

This file was deleted.

0 comments on commit 1fb348c

Please sign in to comment.