Skip to content

Commit

Permalink
http: refactor to remove redundant argument of _deferToConnect
Browse files Browse the repository at this point in the history
PR-URL: #38598
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
pd4d10 authored and targos committed May 17, 2021
1 parent ec8ab22 commit 3d8b8e1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/_http_client.js
Expand Up @@ -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
Expand All @@ -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 = () => {
Expand Down

0 comments on commit 3d8b8e1

Please sign in to comment.