Skip to content

Commit 3d8b8e1

Browse files
pd4d10targos
authored andcommitted
http: refactor to remove redundant argument of _deferToConnect
PR-URL: #38598 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent ec8ab22 commit 3d8b8e1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/_http_client.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ function onSocketNT(req, socket, err) {
818818
}
819819

820820
ClientRequest.prototype._deferToConnect = _deferToConnect;
821-
function _deferToConnect(method, arguments_, cb) {
821+
function _deferToConnect(method, arguments_) {
822822
// This function is for calls that need to happen once the socket is
823823
// assigned to this request and writable. It's an important promisy
824824
// thing for all the socket calls that happen either now
@@ -828,9 +828,6 @@ function _deferToConnect(method, arguments_, cb) {
828828
const callSocketMethod = () => {
829829
if (method)
830830
ReflectApply(this.socket[method], this.socket, arguments_);
831-
832-
if (typeof cb === 'function')
833-
cb();
834831
};
835832

836833
const onSocket = () => {

0 commit comments

Comments
 (0)