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 jasnell committed Oct 17, 2018
1 parent 8165657 commit 33a2186
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 @@ -152,7 +152,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 33a2186

Please sign in to comment.