diff --git a/lib/net.js b/lib/net.js index 61ff7327fb..e92ec369e5 100644 --- a/lib/net.js +++ b/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;