diff options
author | Kim Alvefur <zash@zash.se> | 2020-06-25 19:28:51 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-06-25 19:28:51 +0200 |
commit | 61000837f8e6723cb2542d6c0ce6d0575d25ec80 (patch) | |
tree | e0f75ebcc11de5f14cf5f82e6817d75d3497241f | |
parent | 300a9a56c55f29e8ad422973f4674a858c5f30bc (diff) | |
download | prosody-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.lua | 3 |
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}); |