Skip to content

Commit

Permalink
net: use connect() instead of connect.call()
Browse files Browse the repository at this point in the history
Use socket.connect() directly.

PR-URL: #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>
  • Loading branch information
JacksonTian authored and targos committed Oct 10, 2018
1 parent 62a2c81 commit a65bb42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function connect(...args) {
socket.setTimeout(options.timeout);
}

return Socket.prototype.connect.call(socket, normalized);
return socket.connect(normalized);
}


Expand Down

0 comments on commit a65bb42

Please sign in to comment.