mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
feat: Allow direct control of IP family to be returned by DNS lookup
implements #306
This commit is contained in:
parent
70ec2a45a7
commit
3c38fe48fe
4 changed files with 9 additions and 7 deletions
|
|
@ -5,7 +5,8 @@ const GameResolver = require('./GameResolver'),
|
|||
const defaultOptions = {
|
||||
socketTimeout: 2000,
|
||||
attemptTimeout: 10000,
|
||||
maxAttempts: 1
|
||||
maxAttempts: 1,
|
||||
ipFamily: 0
|
||||
};
|
||||
|
||||
class QueryRunner {
|
||||
|
|
@ -19,7 +20,7 @@ class QueryRunner {
|
|||
async run(userOptions) {
|
||||
for (const key of Object.keys(userOptions)) {
|
||||
const value = userOptions[key];
|
||||
if (['port'].includes(key)) {
|
||||
if (['port', 'ipFamily'].includes(key)) {
|
||||
userOptions[key] = parseInt(value);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue