diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-03-07 19:57:28 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-03-07 19:57:28 +0000 |
commit | 9dd38d32f927e10b0a1d9346cc0e000009d8256a (patch) | |
tree | 498259643a3c0b270f4093c7d85af4d94ea297eb /net/adns.lua | |
parent | a40ad27d1e7ffccd986487ddb02e6d685a628a17 (diff) | |
download | prosody-9dd38d32f927e10b0a1d9346cc0e000009d8256a.tar.gz prosody-9dd38d32f927e10b0a1d9346cc0e000009d8256a.zip |
net.adns: Set new send in net.server after 'connecting UDP' socket
Diffstat (limited to 'net/adns.lua')
-rw-r--r-- | net/adns.lua | 2 |
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; |