# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1342971927 -3600
# Node ID 8950510ddb2e67c37b269e089321b1cbde121677
# Parent  ab696f5394cff18f28671d375af2ac336f531224
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

diff -r ab696f5394cf -r 8950510ddb2e 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",