http: refactor to remove redundant argument of _deferToConnect

PR-URL: https://github.com/nodejs/node/pull/38598
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Rongjian Zhang 2021-05-08 17:09:18 +08:00 committed by Daniele Belardi
parent 70157b9cb7
commit a03d3afa69
No known key found for this signature in database
GPG Key ID: 91C67200C945858D
1 changed files with 1 additions and 4 deletions

View File

@ -818,7 +818,7 @@ function onSocketNT(req, socket, err) {
}
ClientRequest.prototype._deferToConnect = _deferToConnect;
function _deferToConnect(method, arguments_, cb) {
function _deferToConnect(method, arguments_) {
// This function is for calls that need to happen once the socket is
// assigned to this request and writable. It's an important promisy
// thing for all the socket calls that happen either now
@ -828,9 +828,6 @@ function _deferToConnect(method, arguments_, cb) {
const callSocketMethod = () => {
if (method)
ReflectApply(this.socket[method], this.socket, arguments_);
if (typeof cb === 'function')
cb();
};
const onSocket = () => {