mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
http2: remove unnecessary bind from setImmediate
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
cc9712d7b3
commit
84603ec3ee
1 file changed
+5
-1
@@ -2155,12 +2155,16 @@ class Http2Stream extends Duplex {
|
||||
// By using setImmediate we allow pushStreams to make it through
|
||||
// before the stream is officially closed. This prevents a bug
|
||||
// in most browsers where those pushStreams would be rejected.
|
||||
setImmediate(this.close.bind(this));
|
||||
setImmediate(callStreamClose, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function callStreamClose(stream) {
|
||||
stream.close();
|
||||
}
|
||||
|
||||
function processHeaders(oldHeaders) {
|
||||
assertIsObject(oldHeaders, 'headers');
|
||||
const headers = Object.create(null);
|
||||
|
||||
Reference in new issue
Block a user