Comparison

net/dns.lua @ 1949:e3d777d76b1a

net.dns: Remove sockets from socketset when closing them, fixes a leak
author Matthew Wild <mwild1@gmail.com>
date Tue, 13 Oct 2009 11:12:49 +0100
parent 1827:fc21e8832848
child 1950:a1d186c8c65a
comparison
equal deleted inserted replaced
1947:ff2b86076e9c 1949:e3d777d76b1a
556 self.socket_wrapper = func 556 self.socket_wrapper = func
557 end 557 end
558 558
559 559
560 function resolver:closeall () -- - - - - - - - - - - - - - - - - - closeall 560 function resolver:closeall () -- - - - - - - - - - - - - - - - - - closeall
561 for i,sock in ipairs (self.socket) do self.socket[i]:close () end 561 for i,sock in ipairs (self.socket) do
562 self.socket = {} 562 self.socket[i] = nil;
563 self.socketset[sock] = nil;
564 sock:close();
565 end
563 end 566 end
564 567
565 568
566 function resolver:remember (rr, type) -- - - - - - - - - - - - - - remember 569 function resolver:remember (rr, type) -- - - - - - - - - - - - - - remember
567 570