Diff

plugins/mod_s2s/mod_s2s.lua @ 6359:c74670b3be53

mod_s2s: Mark stream as opened earlier for outgoing connections, fixes double stream headers on policy failures
author Kim Alvefur <zash@zash.se>
date Tue, 26 Aug 2014 21:50:08 +0200
parent 5975:0d219631d47b
child 6362:f5f44504e18b
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua	Tue Aug 26 12:19:27 2014 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua	Tue Aug 26 21:50:08 2014 +0200
@@ -362,7 +362,9 @@
 			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 @@
 			end
 		end
 	end
-	session.notopen = nil;
 end
 
 function stream_callbacks.streamclosed(session)