net/dns.lua
changeset 8903 fcf42bd7d067
parent 8901 e6ba0e5260b4
child 8904 eae606b9266c
--- a/net/dns.lua	Sat Jun 09 00:09:25 2018 +0200
+++ b/net/dns.lua	Sat Jun 09 15:35:03 2018 +0200
@@ -672,7 +672,7 @@
 	self.cache = self.cache or setmetatable({}, cache_metatable);
 	local rrs = get(self.cache, qclass, type, qname) or
 		set(self.cache, qclass, type, qname, setmetatable({}, rrs_metatable));
-	if not rrs[rr[qtype:lower()]] then
+	if rr[qtype:lower()] and not rrs[rr[qtype:lower()]] then
 		rrs[rr[qtype:lower()]] = true;
 		append(rrs, rr);
 	end