From 77ee71daa77d72c5a51a00f56f721e4ba463616e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 21 Jan 2021 23:33:59 +0100 Subject: net.unbound: Fix to initialize under prosodyctl Lazy initialization only worked for async queries, but prosodyctl check dns uses sync queries. --- net/unbound.lua | 1 + 1 file changed, 1 insertion(+) 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]; -- cgit v1.2.3