aboutsummaryrefslogtreecommitdiffstats
path: root/net/adns.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-10-30 12:05:24 +0100
committerKim Alvefur <zash@zash.se>2014-10-30 12:05:24 +0100
commitbe1fe5d71550546f71b76efa07d160e2f9403774 (patch)
treeed02cb1447e07a07d68f7cba2c954db812dfc44a /net/adns.lua
parent5d050ae1e6ad245debbc3f644680c99dd50932c5 (diff)
downloadprosody-be1fe5d71550546f71b76efa07d160e2f9403774.tar.gz
prosody-be1fe5d71550546f71b76efa07d160e2f9403774.zip
net.adns: Preserve error from setpeername
Diffstat (limited to 'net/adns.lua')
-rw-r--r--net/adns.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/adns.lua b/net/adns.lua
index 2a3fa8ad..da7981ba 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -76,7 +76,7 @@ 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)