Diff

util/prosodyctl/check.lua @ 10971:3cdb4a7cb406

util.prosodyctl.check: Use net.unbound for DNS if available Improves performance somewhat by avoiding the rate limiting in net.dns
author Kim Alvefur <zash@zash.se>
date Thu, 25 Jun 2020 19:28:51 +0200
parent 10932:ea4a7619058f
child 11303:0d932bf3a0f7
line wrap: on
line diff
--- a/util/prosodyctl/check.lua	Thu Jun 25 19:24:58 2020 +0200
+++ b/util/prosodyctl/check.lua	Thu Jun 25 19:28:51 2020 +0200
@@ -225,6 +225,9 @@
 	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});