# HG changeset patch # User Kim Alvefur # Date 1366904070 -7200 # Node ID fabff75bfc3f714b67d2940505c82a2bd47badea # Parent 8b1250df82e809b67a6842c79164426de7fcf3c5 mod_smacks: If a hibernating session was destroyed before the timeout, don't destroy it again or say that it was resumed diff -r 8b1250df82e8 -r fabff75bfc3f mod_smacks/mod_smacks.lua --- 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