Changeset

987:fabff75bfc3f

mod_smacks: If a hibernating session was destroyed before the timeout, don't destroy it again or say that it was resumed
author Kim Alvefur <zash@zash.se>
date Thu, 25 Apr 2013 17:34:30 +0200
parents 986:8b1250df82e8
children 988:c15cea87036f
files mod_smacks/mod_smacks.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua	Wed Apr 24 10:20:55 2013 +0200
+++ b/mod_smacks/mod_smacks.lua	Thu Apr 25 17:34:30 2013 +0200
@@ -230,7 +230,9 @@
 				-- (for example, the client may have bound a new resource and
 				-- started a new smacks session, or not be using smacks)
 				local curr_session = full_sessions[session.full_jid];
-				if curr_session and curr_session.resumption_token == resumption_token
+				if false and session.destroyed then
+					session.log("debug", "The session has already been destroyed");
+				elseif curr_session and curr_session.resumption_token == resumption_token
 				-- Check the hibernate time still matches what we think it is,
 				-- otherwise the session resumed and re-hibernated.
 				and session.hibernating == hibernate_time then