Comparison

net/dns.lua @ 3325:b3117a1da834

net.dns, net.adns: Move coroutine-calling logic into resolver:cancel()
author Matthew Wild <mwild1@gmail.com>
date Mon, 05 Jul 2010 11:51:17 +0100
parent 3324:070c8ba71b76
child 3326:fb95015bc646
comparison
equal deleted inserted replaced
3324:070c8ba71b76 3325:b3117a1da834
828 end 828 end
829 829
830 return response; 830 return response;
831 end 831 end
832 832
833 function resolver:cancel(data) 833 function resolver:cancel(data, call_handler)
834 local cos = get(self.wanted, unpack(data, 1, 3)); 834 local cos = get(self.wanted, unpack(data, 1, 3));
835 if cos then 835 if cos then
836 if call_handler then
837 coroutine.resume(data[4]);
838 end
836 cos[data[4]] = nil; 839 cos[data[4]] = nil;
837 end 840 end
838 end 841 end
839 842
840 function resolver:pulse() -- - - - - - - - - - - - - - - - - - - - - pulse 843 function resolver:pulse() -- - - - - - - - - - - - - - - - - - - - - pulse