diff options
author | Kim Alvefur <zash@zash.se> | 2021-01-21 23:33:59 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-01-21 23:33:59 +0100 |
commit | 8681102aa798ead9f8f33c58099cdceb13edcbdb (patch) | |
tree | ebd6bee683728140fb4e458027d0b28b1ba028d8 | |
parent | e073b8548705e56586c969165a9f87c455437483 (diff) | |
download | prosody-8681102aa798ead9f8f33c58099cdceb13edcbdb.tar.gz prosody-8681102aa798ead9f8f33c58099cdceb13edcbdb.zip |
net.unbound: Fix to initialize under prosodyctl
Lazy initialization only worked for async queries, but prosodyctl check
dns uses sync queries.
-rw-r--r-- | net/unbound.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/unbound.lua b/net/unbound.lua index c70f3965..22b0614b 100644 --- a/net/unbound.lua +++ b/net/unbound.lua @@ -139,6 +139,7 @@ local function lookup(callback, qname, qtype, qclass) end local function lookup_sync(qname, qtype, qclass) + if not unbound then initialize(); end qtype = qtype and s_upper(qtype) or "A"; qclass = qclass and s_upper(qclass) or "IN"; local ntype, nclass = types[qtype], classes[qclass]; |