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 baece55

Browse filesBrowse files
apapirovskitargos
authored andcommitted
http: remove unnecessary bind
process.nextTick accepts additional parameters which are passed through to the callback. Use that instead of binding the function to a context. 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 9b730ad commit baece55
Copy full SHA for baece55

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎lib/_http_client.js‎

Copy file name to clipboardExpand all lines: lib/_http_client.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ ClientRequest.prototype._implicitHeader = function _implicitHeader() {
313313

314314
ClientRequest.prototype.abort = function abort() {
315315
if (!this.aborted) {
316-
process.nextTick(emitAbortNT.bind(this));
316+
process.nextTick(emitAbortNT, this);
317317
}
318318
this.aborted = true;
319319

@@ -331,8 +331,8 @@ ClientRequest.prototype.abort = function abort() {
331331
};
332332

333333

334-
function emitAbortNT() {
335-
this.emit('abort');
334+
function emitAbortNT(req) {
335+
req.emit('abort');
336336
}
337337

338338
function ondrain() {

0 commit comments

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