Comparison

net/adns.lua @ 5730:411e9e7d8035

net.dns, net.adns: Make sure errors from net.server are propagated (thanks asterix)
author Kim Alvefur <zash@zash.se>
date Wed, 10 Jul 2013 07:45:10 +0200
parent 4103:c994524ef953
child 5776:bd0ff8ae98a8
child 6287:a380b09649e6
comparison
equal deleted inserted replaced
5728:2ecf400b194a 5730:411e9e7d8035
66 end 66 end
67 67
68 resolver:servfail(conn); -- Let the magic commence 68 resolver:servfail(conn); -- Let the magic commence
69 end 69 end
70 end 70 end
71 handler = server.wrapclient(sock, "dns", 53, listener); 71 handler, err = server.wrapclient(sock, "dns", 53, listener);
72 if not handler then 72 if not handler then
73 log("warn", "handler is nil"); 73 return nil, err;
74 end 74 end
75 75
76 handler.settimeout = function () end 76 handler.settimeout = function () end
77 handler.setsockname = function (_, ...) return sock:setsockname(...); end 77 handler.setsockname = function (_, ...) return sock:setsockname(...); end
78 handler.setpeername = function (_, ...) peername = (...); local ret = sock:setpeername(...); _:set_send(dummy_send); return ret; end 78 handler.setpeername = function (_, ...) peername = (...); local ret = sock:setpeername(...); _:set_send(dummy_send); return ret; end