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 6a989da

Browse filesBrowse files
ZYSzysBridgeAR
authored andcommitted
http2: use the latest settings
Fixes: #29764 PR-URL: #29780 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 014eb67 commit 6a989da
Copy full SHA for 6a989da

File tree

Expand file treeCollapse file tree

2 files changed

+15
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+15
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/http2/core.js‎

Copy file name to clipboardExpand all lines: lib/internal/http2/core.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ function onSettings() {
518518
return;
519519
session[kUpdateTimer]();
520520
debugSessionObj(session, 'new settings received');
521+
session[kRemoteSettings] = undefined;
521522
session.emit('remoteSettings', session.remoteSettings);
522523
}
523524

Collapse file

‎test/parallel/test-http2-session-settings.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http2-session-settings.js
+14-1Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ server.on(
3838
})
3939
);
4040

41+
server.on('session', (session) => {
42+
session.settings({
43+
maxConcurrentStreams: 2
44+
});
45+
});
46+
4147
server.listen(
4248
0,
4349
common.mustCall(() => {
@@ -57,11 +63,18 @@ server.listen(
5763
assert.strictEqual(settings.maxFrameSize, 16384);
5864
}, 2)
5965
);
66+
67+
let calledOnce = false;
6068
client.on(
6169
'remoteSettings',
6270
common.mustCall((settings) => {
6371
assert(settings);
64-
})
72+
assert.strictEqual(
73+
settings.maxConcurrentStreams,
74+
calledOnce ? 2 : (2 ** 32) - 1
75+
);
76+
calledOnce = true;
77+
}, 2)
6578
);
6679

6780
const headers = { ':path': '/' };

0 commit comments

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