mod_s2s: Mark stream as opened directly after opening stream, prevents session.close...
authorKim Alvefur <zash@zash.se>
Wed, 13 May 2015 19:56:22 +0000 (21:56 +0200)
committerKim Alvefur <zash@zash.se>
Wed, 13 May 2015 19:56:22 +0000 (21:56 +0200)
plugins/mod_s2s/mod_s2s.lua

index 1408fd5e1de1e66c1f72bc59e1677fa2b1168707..ee539a2a959675d8edc8cf64053f73e523cf42e4 100644 (file)
@@ -349,6 +349,7 @@ function stream_callbacks.streamopened(session, attr)
                end
 
                session:open_stream(session.to_host, session.from_host)
+               session.notopen = nil;
                if session.version >= 1.0 then
                        local features = st.stanza("stream:features");
                        
@@ -361,7 +362,6 @@ function stream_callbacks.streamopened(session, attr)
                        log("debug", "Sending stream features: %s", tostring(features));
                        session.sends2s(features);
                end
-               session.notopen = nil;
        elseif session.direction == "outgoing" then
                session.notopen = nil;
                if not attr.id then