From a65bb42551b635b3bb948ab1c9f7064da1b77554 Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Sat, 6 Oct 2018 20:09:58 +0800 Subject: [PATCH] net: use connect() instead of connect.call() Use socket.connect() directly. PR-URL: https://github.com/nodejs/node/pull/23289 Reviewed-By: Luigi Pinca Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Thomas Watson Reviewed-By: James M Snell --- lib/net.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net.js b/lib/net.js index df87f128cbe6fd..03f52e2c4aabbb 100644 --- a/lib/net.js +++ b/lib/net.js @@ -151,7 +151,7 @@ function connect(...args) { socket.setTimeout(options.timeout); } - return Socket.prototype.connect.call(socket, normalized); + return socket.connect(normalized); }