diff options
author | Kim Alvefur <zash@zash.se> | 2014-11-09 20:32:33 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-11-09 20:32:33 +0100 |
commit | 3b5fa59a5496cd0d19e2a0dac067188d61d76c36 (patch) | |
tree | 00a4652d294babdf3be6f9add9a811a0e180a5d8 /net/adns.lua | |
parent | 763567fa0236b0b80e0271ed1d3325501b979ee1 (diff) | |
parent | 486335f3dbc84dacf253120f544f1d2ee026cf94 (diff) | |
download | prosody-3b5fa59a5496cd0d19e2a0dac067188d61d76c36.tar.gz prosody-3b5fa59a5496cd0d19e2a0dac067188d61d76c36.zip |
Merge 0.10->trunk
Diffstat (limited to 'net/adns.lua')
-rw-r--r-- | net/adns.lua | 5 |
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; |