Diff

net/dns.lua @ 4400:ac651265766c

net.dns: Preserve metatable on manual cache purge
author Matthew Wild <mwild1@gmail.com>
date Wed, 19 Oct 2011 16:21:56 -0400
parent 4373:9a20acf315c9
child 4422:c25dee24623f
line wrap: on
line diff
--- a/net/dns.lua	Fri Oct 14 00:46:29 2011 +0500
+++ b/net/dns.lua	Wed Oct 19 16:21:56 2011 -0400
@@ -705,7 +705,7 @@
 				end
 			end
 		end
-	else self.cache = {}; end
+	else self.cache = setmetatable({}, cache_metatable); end
 end