Skip to content

Commit a6bf74e

Browse files
dnlupnodejs-github-bot
authored andcommitted
http: use standard args order in IncomingMEssage onError
PR-URL: #33035 Refs: #30625 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent f20a88f commit a6bf74e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎lib/_http_incoming.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ IncomingMessage.prototype._destroy = function _destroy(err, cb){
169169
this.emit('aborted');
170170
}
171171

172-
// If aborted and the underlying socket not already destroyed,
172+
// If aborted and the underlying socket is not already destroyed,
173173
// destroy it.
174174
// We have to check if the socket is already destroyed because finished
175175
// does not call the callback when this methdod is invoked from `_http_client`
@@ -178,10 +178,10 @@ IncomingMessage.prototype._destroy = function _destroy(err, cb){
178178
this.socket.destroy(err);
179179
constcleanup=finished(this.socket,(e)=>{
180180
cleanup();
181-
onError(this,cb,e||err);
181+
onError(this,e||err,cb);
182182
});
183183
}else{
184-
onError(this,cb,err);
184+
onError(this,err,cb);
185185
}
186186
};
187187

@@ -361,7 +361,7 @@ IncomingMessage.prototype._dump = function _dump(){
361361
}
362362
};
363363

364-
functiononError(instance,cb,error){
364+
functiononError(instance,error,cb){
365365
// This is to keep backward compatible behavior.
366366
// An error is emitted only if there are listeners attached to
367367
// the event.

0 commit comments

Comments
(0)