Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 086bb2f

Browse filesBrowse files
TrottBethGriggs
authored andcommitted
Revert "src: let http2 streams end after session close"
This reverts commit dee882e. Moved the test that demonstrated what this commit was fixing to the `known_issues` folder. Fixes: #46234 PR-URL: #46721 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 2497216 commit 086bb2f
Copy full SHA for 086bb2f

File tree

Expand file treeCollapse file tree

2 files changed

+7
-13
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-13
lines changed
Open diff view settings
Collapse file

‎src/node_http2.cc‎

Copy file name to clipboardExpand all lines: src/node_http2.cc
-11Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,17 +1115,6 @@ int Http2Session::OnStreamClose(nghttp2_session* handle,
11151115
if (!stream || stream->is_destroyed())
11161116
return 0;
11171117

1118-
// Don't close synchronously in case there's pending data to be written. This
1119-
// may happen when writing trailing headers.
1120-
if (code == NGHTTP2_NO_ERROR && nghttp2_session_want_write(handle) &&
1121-
!env->is_stopping()) {
1122-
env->SetImmediate([handle, id, code, user_data](Environment* env) {
1123-
OnStreamClose(handle, id, code, user_data);
1124-
});
1125-
1126-
return 0;
1127-
}
1128-
11291118
stream->Close(code);
11301119

11311120
// It is possible for the stream close to occur before the stream is
Collapse file

‎…st-http2-trailers-after-session-close.js‎ ‎…st-http2-trailers-after-session-close.js‎test/parallel/test-http2-trailers-after-session-close.js renamed to test/known_issues/test-http2-trailers-after-session-close.js test/parallel/test-http2-trailers-after-session-close.js renamed to test/known_issues/test-http2-trailers-after-session-close.js

Copy file name to clipboardExpand all lines: test/known_issues/test-http2-trailers-after-session-close.js
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
'use strict';
22

3+
// Fixes: https://github.com/nodejs/node/issues/42713
34
const common = require('../common');
4-
if (!common.hasCrypto)
5+
if (!common.hasCrypto) {
6+
// Remove require('assert').fail when issue is fixed and test
7+
// is moved out of the known_issues directory.
8+
require('assert').fail('missing crypto');
59
common.skip('missing crypto');
10+
}
611
const assert = require('assert');
712
const http2 = require('http2');
813

@@ -31,7 +36,7 @@ server.listen(0, common.mustCall(() => {
3136
client.socket.on('close', common.mustCall());
3237
const req = client.request({
3338
[HTTP2_HEADER_PATH]: '/',
34-
[HTTP2_HEADER_METHOD]: 'POST'
39+
[HTTP2_HEADER_METHOD]: 'POST',
3540
});
3641
req.end();
3742
req.on('response', common.mustCall());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.