aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-05-10 23:05:03 +0200
committerKim Alvefur <zash@zash.se>2012-05-10 23:05:03 +0200
commitf0e489b59100e7894bada6a6d8ac8e69b3951aef (patch)
tree35d984966e297a23deafa00ce49a4eed56273849
parent20408ce29bdb837da90e95e293dfb372afdd1938 (diff)
downloadprosody-f0e489b59100e7894bada6a6d8ac8e69b3951aef.tar.gz
prosody-f0e489b59100e7894bada6a6d8ac8e69b3951aef.zip
s2smanager, mod_s2s: Move checking DNS timeout option to mod_s2s
-rw-r--r--core/s2smanager.lua5
-rw-r--r--plugins/mod_s2s/s2sout.lib.lua2
2 files changed, 2 insertions, 5 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index a4b75db5..ea626baa 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -17,12 +17,7 @@ local logger_init = require "util.logger".init;
local log = logger_init("s2smanager");
-local adns, dns = require "net.adns", require "net.dns";
local config = require "core.configmanager";
-local dns_timeout = config.get("*", "core", "dns_timeout") or 15;
-
---FIXME: s2sout should create its own resolver w/ timeout
-dns.settimeout(dns_timeout);
local prosody = _G.prosody;
incoming_s2s = {};
diff --git a/plugins/mod_s2s/s2sout.lib.lua b/plugins/mod_s2s/s2sout.lib.lua
index f3496597..2ddc9299 100644
--- a/plugins/mod_s2s/s2sout.lib.lua
+++ b/plugins/mod_s2s/s2sout.lib.lua
@@ -26,6 +26,8 @@ local log = module._log;
local sources = {};
+local dns_timeout = module:get_option_number("dns_timeout", 15);
+dns.settimeout(dns_timeout);
local max_dns_depth = module:get_option_number("dns_max_depth", 3);
local s2sout = {};