aboutsummaryrefslogtreecommitdiffstats
path: root/net/adns.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-01-08 23:21:28 +0000
committerMatthew Wild <mwild1@gmail.com>2011-01-08 23:21:28 +0000
commitf8d8e7174c21883b0cd2dfc5c6609a034cb7c403 (patch)
tree3ba3493f1c214f6b635c901a0ba591a1ac3f5196 /net/adns.lua
parentdb7bed21d5d5fc10cc7d12163261061d3f38c402 (diff)
parent3fa72ad99ad0d58af36e4abf5431a4fa7f06dbe8 (diff)
downloadprosody-f8d8e7174c21883b0cd2dfc5c6609a034cb7c403.tar.gz
prosody-f8d8e7174c21883b0cd2dfc5c6609a034cb7c403.zip
Merge 0.8->trunk
Diffstat (limited to 'net/adns.lua')
-rw-r--r--net/adns.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/adns.lua b/net/adns.lua
index a3b07b09..cd69a627 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -79,7 +79,8 @@ function new_async_socket(sock, resolver)
handler.connect = function (_, ...) return sock:connect(...) end
--handler.send = function (_, data) _:write(data); return _.sendbuffer and _.sendbuffer(); end
handler.send = function (_, data)
- log("debug", "Sending DNS query to %s", sock:getpeername());
+ local getpeername = sock.getpeername;
+ log("debug", "Sending DNS query to %s", (getpeername and getpeername(sock)) or "<unconnected>");
return sock:send(data);
end
return handler;