Skip to content

Commit aa395b7

Browse files
cjihrigjasnell
authored andcommitted
net: set ADDRCONFIG DNS hint in connections
b85a50b 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: #6133 PR-URL: #6281 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
1 parent 54f2218 commit aa395b7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/net.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,10 @@ function lookupAndConnect(self, options) {
949949
hints: options.hints || 0
950950
};
951951

952+
if (dnsopts.family !== 4 && dnsopts.family !== 6 && dnsopts.hints === 0) {
953+
dnsopts.hints = dns.ADDRCONFIG;
954+
}
955+
952956
debug('connect: find host ' + host);
953957
debug('connect: dns options', dnsopts);
954958
self._host = host;

0 commit comments

Comments
 (0)