mod_s2s: Mark stream as opened earlier for outgoing connections, fixes double stream...
authorKim Alvefur <zash@zash.se>
Tue, 26 Aug 2014 19:50:08 +0000 (21:50 +0200)
committerKim Alvefur <zash@zash.se>
Tue, 26 Aug 2014 19:50:08 +0000 (21:50 +0200)
plugins/mod_s2s/mod_s2s.lua

index aa517bbd73c06f9e4ee3dfa8b3bd5c0909670c44..d4864a38e8197efd66c57f422e5c5c27b977adde 100644 (file)
@@ -362,7 +362,9 @@ function stream_callbacks.streamopened(session, attr)
                        log("debug", "Sending stream features: %s", tostring(features));
                        send(features);
                end
+               session.notopen = nil;
        elseif session.direction == "outgoing" then
+               session.notopen = nil;
                -- If we are just using the connection for verifying dialback keys, we won't try and auth it
                if not attr.id then error("stream response did not give us a streamid!!!"); end
                session.streamid = attr.id;
@@ -396,7 +398,6 @@ function stream_callbacks.streamopened(session, attr)
                        end
                end
        end
-       session.notopen = nil;
 end
 
 function stream_callbacks.streamclosed(session)