diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-07-02 17:43:01 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-07-02 17:43:01 +0100 |
commit | 1309f761cb42ad3502fda993efaf56cb3dca3860 (patch) | |
tree | 95076509292ed587c6d30c220596d08a8ae87634 /core | |
parent | e0f91c8cd59a5a056a7443f444fca2fb7907ee75 (diff) | |
download | prosody-1309f761cb42ad3502fda993efaf56cb3dca3860.tar.gz prosody-1309f761cb42ad3502fda993efaf56cb3dca3860.zip |
s2smanager: Register outgoing connection with the connection listener only after initializing filters (thanks darkrain, dersd)
Diffstat (limited to 'core')
-rw-r--r-- | core/s2smanager.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 711f9464..5853b2ec 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -342,10 +342,6 @@ function make_connect(host_session, connect_host, connect_port) 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 @@ function make_connect(host_session, connect_host, connect_port) 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..."); |