net: remove unnecessary process.nextTick()

Call internalConnect() directly when the target is an IP address.
No delay is necessary because it defers any callbacks it makes.

PR-URL: https://github.com/nodejs/node/pull/12342
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Ben Noordhuis authored and Evan Lucas committed 2017-05-02 12:46:13 -05:00
1 parent dcc9e1a7d4
commit d0b1be13f9
1 file changed
+1 -4
+1 -4
View File
@@ -969,10 +969,7 @@ function lookupAndConnect(self, options) {
// If host is an IP, skip performing a lookup
var addressType = cares.isIP(host);
if (addressType) {
process.nextTick(function() {
if (self.connecting)
internalConnect(self, host, port, addressType, localAddress, localPort);
});
internalConnect(self, host, port, addressType, localAddress, localPort);
return;
}