# HG changeset patch # User Matthew Wild # Date 1226261698 0 # Node ID 24bcdaacc0bf3d5ec96fb34b00fac2148e98eaa9 # Parent e46525f5b2a4c2dd766fc17b9d8539746506d5ea Prevent slow connects for s2s from blocking for so long diff -r e46525f5b2a4 -r 24bcdaacc0bf core/s2smanager.lua --- a/core/s2smanager.lua Sun Nov 09 05:24:47 2008 +0500 +++ b/core/s2smanager.lua Sun Nov 09 20:14:58 2008 +0000 @@ -78,6 +78,7 @@ 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;