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 dce435d

Browse filesBrowse files
apapirovskitargos
authored andcommitted
http2: remove unnecessary bind from setImmediate
PR-URL: #28131 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 91845d8 commit dce435d
Copy full SHA for dce435d

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+5
-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
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2155,12 +2155,16 @@ class Http2Stream extends Duplex {
21552155
// By using setImmediate we allow pushStreams to make it through
21562156
// before the stream is officially closed. This prevents a bug
21572157
// in most browsers where those pushStreams would be rejected.
2158-
setImmediate(this.close.bind(this));
2158+
setImmediate(callStreamClose, this);
21592159
}
21602160
}
21612161
}
21622162
}
21632163

2164+
function callStreamClose(stream) {
2165+
stream.close();
2166+
}
2167+
21642168
function processHeaders(oldHeaders) {
21652169
assertIsObject(oldHeaders, 'headers');
21662170
const headers = Object.create(null);

0 commit comments

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