diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/dns.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/dns.lua b/net/dns.lua index e793c397..fe327ed2 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -558,8 +558,11 @@ function resolver:socket_wrapper_set (func) -- - - - - - - socket_wrapper_set function resolver:closeall () -- - - - - - - - - - - - - - - - - - closeall - for i,sock in ipairs (self.socket) do self.socket[i]:close () end - self.socket = {} + for i,sock in ipairs (self.socket) do + self.socket[i] = nil; + self.socketset[sock] = nil; + sock:close(); + end end |