aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-06-25 19:28:51 +0200
committerKim Alvefur <zash@zash.se>2020-06-25 19:28:51 +0200
commit61000837f8e6723cb2542d6c0ce6d0575d25ec80 (patch)
treee0f75ebcc11de5f14cf5f82e6817d75d3497241f
parent300a9a56c55f29e8ad422973f4674a858c5f30bc (diff)
downloadprosody-61000837f8e6723cb2542d6c0ce6d0575d25ec80.tar.gz
prosody-61000837f8e6723cb2542d6c0ce6d0575d25ec80.zip
util.prosodyctl.check: Use net.unbound for DNS if available
Improves performance somewhat by avoiding the rate limiting in net.dns
-rw-r--r--util/prosodyctl/check.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua
index ca5c51c9..86394a18 100644
--- a/util/prosodyctl/check.lua
+++ b/util/prosodyctl/check.lua
@@ -225,6 +225,9 @@ local function check(arg)
end
if not what or what == "dns" then
local dns = require "net.dns";
+ pcall(function ()
+ dns = require"net.unbound".dns;
+ end)
local idna = require "util.encodings".idna;
local ip = require "util.ip";
local c2s_ports = set.new(configmanager.get("*", "c2s_ports") or {5222});