mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
Merge pull request #307 from cetteup/feature/dns-ip-family
Allow direct control of IP family to be returned by DNS lookup
This commit is contained in:
commit
57a6a2fadd
5 changed files with 10 additions and 7 deletions
|
|
@ -69,7 +69,7 @@ class Core extends EventEmitter {
|
|||
async runOnce() {
|
||||
const options = this.options;
|
||||
if (('host' in options) && !('address' in options)) {
|
||||
const resolved = await this.dnsResolver.resolve(options.host, this.srvRecord);
|
||||
const resolved = await this.dnsResolver.resolve(options.host, options.ipFamily, this.srvRecord);
|
||||
options.address = resolved.address;
|
||||
if (resolved.port) options.port = resolved.port;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue