Diff

mod_smacks/mod_smacks.lua @ 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
parent 925:720b8268778e
child 988:c15cea87036f
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