aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-09 20:14:58 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-09 20:14:58 +0000
commita94c596c02852294020e5d1b86a70e04ec4b9e5d (patch)
treeb6bd34ed1d520715641b3d8137e0708455737d4b /core/s2smanager.lua
parentba880d621596c0a9c384789bca5698ea4f3ea010 (diff)
downloadprosody-a94c596c02852294020e5d1b86a70e04ec4b9e5d.tar.gz
prosody-a94c596c02852294020e5d1b86a70e04ec4b9e5d.zip
Prevent slow connects for s2s from blocking for so long
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 2f2f1d92..76edc8af 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -78,6 +78,7 @@ function new_outgoing(from_host, to_host)
local conn, handler = socket.tcp()
--FIXME: Below parameters (ports/ip) are incorrect (use SRV)
to_host = srvmap[to_host] or to_host;
+ conn:settimeout(0.1);
conn:connect(to_host, 5269);
conn = wraptlsclient(cl, conn, to_host, 5269, 0, 1, hosts[from_host].ssl_ctx );
host_session.conn = conn;