aboutsummaryrefslogtreecommitdiffstats
path: root/net/adns.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-11-09 20:30:04 +0100
committerKim Alvefur <zash@zash.se>2014-11-09 20:30:04 +0100
commit61b8eb49edf8e9a2d1ae2d55a898fc6e69a6f59e (patch)
tree97f78b366acac27667ddfb525a3a5aeabd37ddcf /net/adns.lua
parenta7872b1358e707800ea5efb4e49109c511d3c5d9 (diff)
parentce6a2af78f81381026b4aee05638a624ec8eba5e (diff)
downloadprosody-61b8eb49edf8e9a2d1ae2d55a898fc6e69a6f59e.tar.gz
prosody-61b8eb49edf8e9a2d1ae2d55a898fc6e69a6f59e.zip
Merge 0.9 -> 0.10
Diffstat (limited to 'net/adns.lua')
-rw-r--r--net/adns.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/adns.lua b/net/adns.lua
index 15814fe7..87f2876b 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -76,12 +76,11 @@ function new_async_socket(sock, resolver)
handler.settimeout = function () end
handler.setsockname = function (_, ...) return sock:setsockname(...); end
- handler.setpeername = function (_, ...) peername = (...); local ret = sock:setpeername(...); _:set_send(dummy_send); return ret; end
+ handler.setpeername = function (_, ...) peername = (...); local ret, err = sock:setpeername(...); _:set_send(dummy_send); return ret, err; end
handler.connect = function (_, ...) return sock:connect(...) end
--handler.send = function (_, data) _:write(data); return _.sendbuffer and _.sendbuffer(); end
handler.send = function (_, data)
- local getpeername = sock.getpeername;
- log("debug", "Sending DNS query to %s", (getpeername and getpeername(sock)) or "<unconnected>");
+ log("debug", "Sending DNS query to %s", peername);
return sock:send(data);
end
return handler;