Browse Source

net: set ADDRCONFIG DNS hint in connections

b85a50b6da removed the implicit
setting of DNS hints when creating a connection. This caused some
of the pi2 machines to become flaky. This commit restores the
implicit dns.ADDRCONFIG hint, but not dns.V4MAPPED.

Fixes: https://github.com/nodejs/node/issues/6133
PR-URL: https://github.com/nodejs/node/pull/6281
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
process-exit-stdio-flushing
cjihrig 9 years ago
parent
commit
54dd7c38e5
  1. 4
      lib/net.js

4
lib/net.js

@ -949,6 +949,10 @@ function lookupAndConnect(self, options) {
hints: options.hints || 0
};
if (dnsopts.family !== 4 && dnsopts.family !== 6 && dnsopts.hints === 0) {
dnsopts.hints = dns.ADDRCONFIG;
}
debug('connect: find host ' + host);
debug('connect: dns options', dnsopts);
self._host = host;

Loading…
Cancel
Save