cryptDns重试请求

This commit is contained in:
陈国伟 2021-09-26 17:46:45 +08:00
parent 930a8b624a
commit b6348133e4
2 changed files with 2 additions and 2 deletions

View File

@ -46,11 +46,10 @@ namespace FastGithub.DomainResolve
{
var key = $"{dns}:{domain}";
var semaphore = this.semaphoreSlims.GetOrAdd(key, _ => new SemaphoreSlim(1, 1));
await semaphore.WaitAsync(CancellationToken.None);
try
{
await semaphore.WaitAsync(CancellationToken.None);
if (this.dnsCache.TryGetValue<IPAddress[]>(key, out var value) == false)
{
value = await this.LookupCoreAsync(dns, domain, cancellationToken);

View File

@ -78,6 +78,7 @@ namespace FastGithub.DomainResolve
if (cryptDns != null)
{
yield return cryptDns;
yield return cryptDns;
}
foreach (var fallbackDns in this.fastGithubConfig.FallbackDns)