summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Tian <shyvo1987@gmail.com>2018-10-06 20:09:58 +0800
committerJames M Snell <jasnell@gmail.com>2018-10-17 11:26:53 -0700
commit33a2186942e093d072c0991d105b83334933cf15 (patch)
tree8ac96443590c3a3279eb74c830f5388a31f0cbf4
parent8165657d9ead768382a2ada9b06f66827f1b29e2 (diff)
downloadnode-new-33a2186942e093d072c0991d105b83334933cf15.tar.gz
net: use connect() instead of connect.call()
Use socket.connect() directly. PR-URL: https://github.com/nodejs/node/pull/23289 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Thomas Watson <w@tson.dk> Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r--lib/net.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net.js b/lib/net.js
index 8fdd7bd86a..f7d55ca646 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -152,7 +152,7 @@ function connect(...args) {
socket.setTimeout(options.timeout);
}
- return Socket.prototype.connect.call(socket, normalized);
+ return socket.connect(normalized);
}