num-client
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -121,7 +121,7 @@ "use strict"; | ||
return __generator(this, function (_a) { | ||
return [2, this._getRecordFromDns(query, checkDnsSecValidity, this.dnsClients.length)]; | ||
return [2, this._getRecordFromDns(query, checkDnsSecValidity, this.dnsClients.length, this.clientIndex)]; | ||
}); | ||
}); | ||
}; | ||
DnsServicesImpl.prototype._getRecordFromDns = function (query, checkDnsSecValidity, attempts) { | ||
DnsServicesImpl.prototype._getRecordFromDns = function (query, checkDnsSecValidity, attempts, dohIndex) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -135,3 +135,3 @@ var question; | ||
question = new dnsclient_1.Question(query, 'TXT', checkDnsSecValidity); | ||
return [2, this.dnsClients[this.clientIndex] | ||
return [2, this.dnsClients[dohIndex] | ||
.query(question) | ||
@@ -150,5 +150,5 @@ .then(function (result) { | ||
} | ||
_this.clientIndex = (_this.clientIndex + 1) % _this.dnsClients.length; | ||
loglevel_1.default.warn("Switching to DoH: " + _this.dnsClients[_this.clientIndex].getResolver().name + " due to " + JSON.stringify(e)); | ||
return _this._getRecordFromDns(query, checkDnsSecValidity, attempts - 1); | ||
dohIndex = (dohIndex + 1) % _this.dnsClients.length; | ||
loglevel_1.default.warn("Switching to DoH: " + _this.dnsClients[dohIndex].getResolver().name + " due to " + JSON.stringify(e)); | ||
return _this._getRecordFromDns(query, checkDnsSecValidity, attempts - 1, dohIndex); | ||
})]; | ||
@@ -155,0 +155,0 @@ }); |
{ | ||
"name": "num-client", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A NUM Protocol Client in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
495953