mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
1 parent
dcc9e1a7d4
commit
d0b1be13f9
1 file changed
+1
-4
+1
-4
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user