mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
net.dns: Initialize default resolver on module load (instead of on first use).
This commit is contained in:
parent
c19649f069
commit
c129a0b2b9
1 changed files with 1 additions and 1 deletions
|
@ -889,7 +889,6 @@ function resolver.print (response) -- - - - - - - - - - - - - resolver.print
|
|||
|
||||
|
||||
local function resolve (func, ...) -- - - - - - - - - - - - - - resolver_get
|
||||
dns._resolver = dns._resolver or dns.resolver ()
|
||||
return func (dns._resolver, ...)
|
||||
end
|
||||
|
||||
|
@ -930,5 +929,6 @@ function dns.cancel(...) -- - - - - - - - - - - - - - - - - - - - - - cancel
|
|||
function dns:socket_wrapper_set (...) -- - - - - - - - - socket_wrapper_set
|
||||
return resolve (resolver.socket_wrapper_set, ...) end
|
||||
|
||||
dns._resolver = dns.resolver ()
|
||||
|
||||
return dns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue