mod_smacks: If a hibernating session was destroyed before the timeout, don't destroy it again or say that it was resumed
--- 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