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:
parent
117b83c2dd
commit
571882c5a4
@ -991,10 +991,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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user