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
--- 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",