net.dns: Remove sockets from socketset when closing them, fixes a leak

This commit is contained in:
Matthew Wild 2009-10-13 11:12:49 +01:00
parent 193278754c
commit 3967579413

View file

@ -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