Comparison

core/s2smanager.lua @ 4832:6b3aec1e0d9f

s2smanager, mod_s2s: Move checking DNS timeout option to mod_s2s
author Kim Alvefur <zash@zash.se>
date Thu, 10 May 2012 23:05:03 +0200
parent 4831:da2c49a9ab99
child 4833:b7a6e86ab87d
comparison
equal deleted inserted replaced
4831:da2c49a9ab99 4832:6b3aec1e0d9f
15 local fire_event = prosody.events.fire_event; 15 local fire_event = prosody.events.fire_event;
16 local logger_init = require "util.logger".init; 16 local logger_init = require "util.logger".init;
17 17
18 local log = logger_init("s2smanager"); 18 local log = logger_init("s2smanager");
19 19
20 local adns, dns = require "net.adns", require "net.dns";
21 local config = require "core.configmanager"; 20 local config = require "core.configmanager";
22 local dns_timeout = config.get("*", "core", "dns_timeout") or 15;
23
24 --FIXME: s2sout should create its own resolver w/ timeout
25 dns.settimeout(dns_timeout);
26 21
27 local prosody = _G.prosody; 22 local prosody = _G.prosody;
28 incoming_s2s = {}; 23 incoming_s2s = {};
29 prosody.incoming_s2s = incoming_s2s; 24 prosody.incoming_s2s = incoming_s2s;
30 local incoming_s2s = incoming_s2s; 25 local incoming_s2s = incoming_s2s;