diff options
author | Kim Alvefur <zash@zash.se> | 2013-07-10 07:45:10 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2013-07-10 07:45:10 +0200 |
commit | 0eefd598cba2ca39b318a060b01ba0532fbb0077 (patch) | |
tree | 9567263f0c149d8f808508d42366f33e83f6058c /net/dns.lua | |
parent | a8be0a4bbea2985224bd40b077da669373233dfd (diff) | |
download | prosody-0eefd598cba2ca39b318a060b01ba0532fbb0077.tar.gz prosody-0eefd598cba2ca39b318a060b01ba0532fbb0077.zip |
net.dns, net.adns: Make sure errors from net.server are propagated (thanks asterix)
Diffstat (limited to 'net/dns.lua')
-rw-r--r-- | net/dns.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dns.lua b/net/dns.lua index 89b50255..cdd949a2 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -622,10 +622,10 @@ function resolver:getsocket(servernum) -- - - - - - - - - - - - - getsocket local err; sock, err = socket.udp(); + if sock and self.socket_wrapper then sock, err = self.socket_wrapper(sock, self); end if not sock then return nil, err; end - if self.socket_wrapper then sock = self.socket_wrapper(sock, self); end sock:settimeout(0); -- todo: attempt to use a random port, fallback to 0 sock:setsockname('*', 0); |