Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRongjian Zhang <pd4d10@gmail.com>2021-05-08 12:09:18 +0300
committerMichaƫl Zasso <targos@protonmail.com>2021-05-17 10:11:36 +0300
commit3d8b8e133f04ce4d892bd57b4d819cd7f9b347fa (patch)
tree422f13ff2404d51dee19e58ff208caa59d72fbfd /lib
parentec8ab22ce6d641edaa23b4e0c41b2e7bec5605da (diff)
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/_http_client.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/_http_client.js b/lib/_http_client.js
index 4184191c0fb..f3b88b62730 100644
--- a/lib/_http_client.js
+++ b/lib/_http_client.js
@@ -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 = () => {