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