Skip to content

Commit

Permalink
net: remove hot path comment from connect
Browse files Browse the repository at this point in the history
This comment was added with an assumption that we could determine the
IP address that localhost should resolve to without performing a
lookup. This was a false assumption and should be removed.

PR-URL: #4648
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
evanlucas authored and Myles Borins committed Feb 15, 2016
1 parent 9ca24de commit 40c8e6d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,6 @@ function lookupAndConnect(self, options) {
port |= 0;

// If host is an IP, skip performing a lookup
// TODO(evanlucas) should we hot path this for localhost?
var addressType = exports.isIP(host);
if (addressType) {
process.nextTick(function() {
Expand Down

0 comments on commit 40c8e6d

Please sign in to comment.