From 92aa52a269dae99d09dca7bfd0c9b0ff68f2b2d2 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 21 Mar 2021 16:37:50 +0530 Subject: [PATCH] minor refactoring --- DnsServerCore/Dns/Zones/CacheZone.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DnsServerCore/Dns/Zones/CacheZone.cs b/DnsServerCore/Dns/Zones/CacheZone.cs index 7f03b9c0..466cca78 100644 --- a/DnsServerCore/Dns/Zones/CacheZone.cs +++ b/DnsServerCore/Dns/Zones/CacheZone.cs @@ -194,10 +194,9 @@ namespace DnsServerCore.Dns.Zones return anyRecords; } - else if (_entries.TryGetValue(type, out IReadOnlyList existingRecords)) - { + + if (_entries.TryGetValue(type, out IReadOnlyList existingRecords)) return FilterExpiredRecords(type, existingRecords, serveStale, filterSpecialCacheRecords); - } return Array.Empty(); }