mod_s2s: Make unauthed session timeout a little more aggressive... otherwise it's possible for sessions to slip under the net and never get killed off
authorMatthew Wild <mwild1@gmail.com>
Sun, 22 Jul 2012 16:45:27 +0100
changeset 4960 8950510ddb2e
parent 4959 ab696f5394cf
child 4961 29b24a4028ed
mod_s2s: Make unauthed session timeout a little more aggressive... otherwise it's possible for sessions to slip under the net and never get killed off
plugins/mod_s2s/mod_s2s.lua
--- a/plugins/mod_s2s/mod_s2s.lua	Sun Jul 22 16:29:52 2012 +0100
+++ b/plugins/mod_s2s/mod_s2s.lua	Sun Jul 22 16:45:27 2012 +0100
@@ -413,11 +413,9 @@
 		return handlestanza(session, stanza);
 	end
 
-	local conn = session.conn;
 	add_task(connect_timeout, function ()
-		if session.conn ~= conn or session.connecting
-		or session.type == "s2sin" or session.type == "s2sout" then
-			return; -- Ok, we're connect[ed|ing]
+		if session.type == "s2sin" or session.type == "s2sout" then
+			return; -- Ok, we're connected
 		end
 		-- Not connected, need to close session and clean up
 		(session.log or log)("debug", "Destroying incomplete session %s->%s due to inactivity",