Comparison

net/adns.lua @ 1901:3c52b949e472

net.adns: Bump log-level of DNS handler errors to, er, 'error'
author Matthew Wild <mwild1@gmail.com>
date Mon, 05 Oct 2009 09:56:08 +0100
parent 1788:45779d67c26c
child 2128:f107f0205793
child 2710:1600aff0839f
comparison
equal deleted inserted replaced
1900:93a94ec05ebe 1901:3c52b949e472
27 dns.query(qname, qtype, qclass); 27 dns.query(qname, qtype, qclass);
28 coroutine.yield({ qclass or "IN", qtype or "A", qname, coroutine.running()}); -- Wait for reply 28 coroutine.yield({ qclass or "IN", qtype or "A", qname, coroutine.running()}); -- Wait for reply
29 log("debug", "Reply for %s (%s)", qname, tostring(coroutine.running())); 29 log("debug", "Reply for %s (%s)", qname, tostring(coroutine.running()));
30 local ok, err = pcall(handler, dns.peek(qname, qtype, qclass)); 30 local ok, err = pcall(handler, dns.peek(qname, qtype, qclass));
31 if not ok then 31 if not ok then
32 log("debug", "Error in DNS response handler: %s", tostring(err)); 32 log("error", "Error in DNS response handler: %s", tostring(err));
33 end 33 end
34 end)(dns.peek(qname, qtype, qclass)); 34 end)(dns.peek(qname, qtype, qclass));
35 end 35 end
36 36
37 function cancel(handle, call_handler) 37 function cancel(handle, call_handler)