aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl
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
commit0d7e7dd525bcf115a32f1a9465e3420c00239019 (patch)
treee0f75ebcc11de5f14cf5f82e6817d75d3497241f /util/prosodyctl
parent1773caa0a30634d92328d4a893c5a2837dbac966 (diff)
downloadprosody-0d7e7dd525bcf115a32f1a9465e3420c00239019.tar.gz
prosody-0d7e7dd525bcf115a32f1a9465e3420c00239019.zip
util.prosodyctl.check: Use net.unbound for DNS if available
Improves performance somewhat by avoiding the rate limiting in net.dns
Diffstat (limited to 'util/prosodyctl')
-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});