Software /
code /
prosody
Diff
net/adns.lua @ 6506:f869eec511c8
net.adns: Preserve error from setpeername
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 30 Oct 2014 12:05:24 +0100 |
parent | 6287:a380b09649e6 |
child | 6507:84ca02c6a47e |
line wrap: on
line diff
--- a/net/adns.lua Fri Oct 24 23:23:02 2014 +0100 +++ b/net/adns.lua Thu Oct 30 12:05:24 2014 +0100 @@ -76,7 +76,7 @@ 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)