aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-11-28 22:47:22 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-11-28 22:47:22 +0500
commite26768484b03eaa827f59b85d367fabbb43fdc88 (patch)
tree457ff944b7e0a88826d9b463066ac1e199311e70 /net
parent47761d875a1db3f3f7415e0f137b3b0287c640e2 (diff)
downloadprosody-e26768484b03eaa827f59b85d367fabbb43fdc88.tar.gz
prosody-e26768484b03eaa827f59b85d367fabbb43fdc88.zip
Quickfix for dns.lua to not crash on failed connection to name servers
Diffstat (limited to 'net')
-rw-r--r--net/dns.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/dns.lua b/net/dns.lua
index 7364161e..ea1d5d96 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -691,7 +691,8 @@ function resolver:pulse () -- - - - - - - - - - - - - - - - - - - - - pulse
if not next (self.active) then return nil end
else
-- print ('retry', o.server, o.delay)
- self.socket[o.server]:send (o.packet)
+ local _a = self.socket[o.server];
+ if _a then _a:send (o.packet) end
o.retry = self.time + self.delays[o.delay]
end end end end