Software /
code /
prosody
Changeset
453:a1efb2cb4f9c
Quickfix for dns.lua to not crash on failed connection to name servers
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 28 Nov 2008 22:47:22 +0500 |
parents | 452:613c5c6bdce4 |
children | 454:21105a005eef |
files | net/dns.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/dns.lua Fri Nov 28 20:17:20 2008 +0500 +++ b/net/dns.lua Fri Nov 28 22:47:22 2008 +0500 @@ -691,7 +691,8 @@ 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