# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1336683903 -7200
# Node ID 6b3aec1e0d9ffca5575e9b414e3be2058355202b
# Parent  da2c49a9ab9937cc022ddeb97ccdc06988f260c2
s2smanager, mod_s2s: Move checking DNS timeout option to mod_s2s

diff -r da2c49a9ab99 -r 6b3aec1e0d9f core/s2smanager.lua
--- a/core/s2smanager.lua	Thu May 10 23:01:10 2012 +0200
+++ b/core/s2smanager.lua	Thu May 10 23:05:03 2012 +0200
@@ -17,12 +17,7 @@
 
 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 -r da2c49a9ab99 -r 6b3aec1e0d9f plugins/mod_s2s/s2sout.lib.lua
--- a/plugins/mod_s2s/s2sout.lib.lua	Thu May 10 23:01:10 2012 +0200
+++ b/plugins/mod_s2s/s2sout.lib.lua	Thu May 10 23:05:03 2012 +0200
@@ -26,6 +26,8 @@
 
 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 = {};