aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-03-07 19:57:28 +0000
committerMatthew Wild <mwild1@gmail.com>2009-03-07 19:57:28 +0000
commit9dd38d32f927e10b0a1d9346cc0e000009d8256a (patch)
tree498259643a3c0b270f4093c7d85af4d94ea297eb /net
parenta40ad27d1e7ffccd986487ddb02e6d685a628a17 (diff)
downloadprosody-9dd38d32f927e10b0a1d9346cc0e000009d8256a.tar.gz
prosody-9dd38d32f927e10b0a1d9346cc0e000009d8256a.zip
net.adns: Set new send in net.server after 'connecting UDP' socket
Diffstat (limited to 'net')
-rw-r--r--net/adns.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/adns.lua b/net/adns.lua
index 200784aa..cb784d40 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -29,7 +29,7 @@ function new_async_socket(sock)
newconn.handler, newconn._socket = server.wrapclient(sock, "dns", 53, listener);
newconn.handler.settimeout = function () end
newconn.handler.setsockname = function (_, ...) return sock:setsockname(...); end
- newconn.handler.setpeername = function (_, ...) return sock:setpeername(...); end
+ newconn.handler.setpeername = function (_, ...) local ret = sock:setpeername(...); _.setsend(sock.send); return ret; end
newconn.handler.connect = function (_, ...) return sock:connect(...) end
newconn.handler.send = function (_, data) return _.write(data) end
return newconn.handler;