net: set ADDRCONFIG DNS hint in connections
b85a50b6da5bbd7e9c8902a13dfbe1a142fd786a 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>
This commit is contained in:
parent
29ca969651
commit
54dd7c38e5
@ -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…
x
Reference in New Issue
Block a user