Mercurial > prosody-hg
comparison core/s2smanager.lua @ 231:24bcdaacc0bf
Prevent slow connects for s2s from blocking for so long
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 09 Nov 2008 20:14:58 +0000 |
| parents | 211c2e04c82b |
| children | 23585c323daa |
comparison
equal
deleted
inserted
replaced
| 230:e46525f5b2a4 | 231:24bcdaacc0bf |
|---|---|
| 76 local cl = connlisteners_get("xmppserver"); | 76 local cl = connlisteners_get("xmppserver"); |
| 77 | 77 |
| 78 local conn, handler = socket.tcp() | 78 local conn, handler = socket.tcp() |
| 79 --FIXME: Below parameters (ports/ip) are incorrect (use SRV) | 79 --FIXME: Below parameters (ports/ip) are incorrect (use SRV) |
| 80 to_host = srvmap[to_host] or to_host; | 80 to_host = srvmap[to_host] or to_host; |
| 81 conn:settimeout(0.1); | |
| 81 conn:connect(to_host, 5269); | 82 conn:connect(to_host, 5269); |
| 82 conn = wraptlsclient(cl, conn, to_host, 5269, 0, 1, hosts[from_host].ssl_ctx ); | 83 conn = wraptlsclient(cl, conn, to_host, 5269, 0, 1, hosts[from_host].ssl_ctx ); |
| 83 host_session.conn = conn; | 84 host_session.conn = conn; |
| 84 | 85 |
| 85 -- Register this outgoing connection so that xmppserver_listener knows about it | 86 -- Register this outgoing connection so that xmppserver_listener knows about it |
