其它异常也缓存
This commit is contained in:
parent
b5647312bf
commit
aba0ea7c2f
@ -133,12 +133,12 @@ namespace FastGithub.DomainResolve
|
||||
catch (SocketException ex)
|
||||
{
|
||||
this.logger.LogWarning($"{endPoint.Host}@{dns}:{ex.Message}");
|
||||
return this.dnsCache.Set(key, Array.Empty<IPAddress>(), this.maxTimeToLive);
|
||||
return this.dnsCache.Set(key, Array.Empty<IPAddress>(), this.minTimeToLive);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.logger.LogWarning($"{endPoint.Host}@{dns}:{ex.Message}");
|
||||
return Array.Empty<IPAddress>();
|
||||
return this.dnsCache.Set(key, Array.Empty<IPAddress>(), this.minTimeToLive);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user