# HG changeset patch # User tmolitor # Date 1503010598 -7200 # Node ID f70c02c14161db0937aefd9f6840e39bc90bf3cc # Parent 1fa9620220e326e48bf3973608701900172ed7a8 mod_smacks: Trigger event smacks-hibernation-end after queue resend This is more sensible and allows other modules to send out stanzas when handling this event without messing with the order of stanzas. diff -r 1fa9620220e3 -r f70c02c14161 mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Thu Aug 17 21:34:56 2017 +0200 +++ b/mod_smacks/mod_smacks.lua Fri Aug 18 00:56:38 2017 +0200 @@ -509,7 +509,6 @@ -- Ok, we need to re-send any stanzas that the client didn't see -- ...they are what is now left in the outgoing stanza queue local queue = original_session.outgoing_stanza_queue; - module:fire_event("smacks-hibernation-end", {origin = session, resumed = original_session, queue = queue}); original_session.log("debug", "#queue = %d", #queue); for i=1,#queue do original_session.send(queue[i]); @@ -519,6 +518,7 @@ session.log("warn", "Tried to send stanza on old session migrated by smacks resume (maybe there is a bug?): %s", tostring(stanza)); return false; end + module:fire_event("smacks-hibernation-end", {origin = session, resumed = original_session, queue = queue}); request_ack_if_needed(original_session, true); else module:log("warn", "Client %s@%s[%s] tried to resume stream for %s@%s[%s]",