Software /
code /
prosody
Diff
core/s2smanager.lua @ 3308:f5243ca9662f
s2smanager: Register outgoing connection with the connection listener only after initializing filters (thanks darkrain, dersd)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 02 Jul 2010 17:43:01 +0100 |
parent | 3265:9374f84c6677 |
child | 3312:12fc7e005e8b |
line wrap: on
line diff
--- a/core/s2smanager.lua Thu Jul 01 15:31:25 2010 +0200 +++ b/core/s2smanager.lua Fri Jul 02 17:43:01 2010 +0100 @@ -342,10 +342,6 @@ conn = wrapclient(conn, connect_host, connect_port, cl, cl.default_mode or 1 ); host_session.conn = conn; - -- Register this outgoing connection so that xmppserver_listener knows about it - -- otherwise it will assume it is a new incoming connection - cl.register_outgoing(conn, host_session); - local filter = initialize_filters(host_session); local w, log = conn.write, host_session.log; host_session.sends2s = function (t) @@ -361,6 +357,10 @@ end end + -- Register this outgoing connection so that xmppserver_listener knows about it + -- otherwise it will assume it is a new incoming connection + cl.register_outgoing(conn, host_session); + host_session:open_stream(from_host, to_host); log("debug", "Connection attempt in progress...");