mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
perf: 为DNS解析器添加超时配置,避免查询时间过长
在util.js中为dns.Resolver添加超时配置,确保DNS查询在合理时间内完成
This commit is contained in:
@@ -148,7 +148,6 @@ async function walkDnsChallengeRecord(recordName, resolver = dns,deep = 0) {
|
||||
/* Authoritative DNS resolver */
|
||||
log(`从域名权威服务器获取TXT解析记录`);
|
||||
const authoritativeResolver = await util.getAuthoritativeDnsResolver(recordName,log);
|
||||
resolver.setTimeout(10000);
|
||||
const res = await walkDnsChallengeRecord(recordName, authoritativeResolver,deep);
|
||||
if (res && res.length > 0) {
|
||||
for (const item of res) {
|
||||
|
||||
Reference in New Issue
Block a user