diff --git a/FastGithub.DomainResolve/DnsClient.cs b/FastGithub.DomainResolve/DnsClient.cs index e34699e..c87478f 100644 --- a/FastGithub.DomainResolve/DnsClient.cs +++ b/FastGithub.DomainResolve/DnsClient.cs @@ -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(), this.maxTimeToLive); + return this.dnsCache.Set(key, Array.Empty(), this.minTimeToLive); } catch (Exception ex) { this.logger.LogWarning($"{endPoint.Host}@{dns}:{ex.Message}"); - return Array.Empty(); + return this.dnsCache.Set(key, Array.Empty(), this.minTimeToLive); } finally {