# HG changeset patch # User tmolitor # Date 1500048377 -7200 # Node ID 91cbeb6ad987b86e20645256e6c5f04929f8c22b # Parent 55f3ab952d0613aa31277f192041aab4b1ab6e00 mod_smacks: don't send out when already hibernating diff -r 55f3ab952d06 -r 91cbeb6ad987 mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Thu Jul 06 10:48:39 2017 +0100 +++ b/mod_smacks/mod_smacks.lua Fri Jul 14 18:06:17 2017 +0200 @@ -152,12 +152,12 @@ local function request_ack_if_needed(session, force) local queue = session.outgoing_stanza_queue; - if session.awaiting_ack == nil then + if session.awaiting_ack == nil and not session.hibernating then if (#queue > max_unacked_stanzas and session.last_queue_count ~= #queue) or force then session.log("debug", "Queuing (in a moment)"); session.awaiting_ack = false; session.awaiting_ack_timer = stoppable_timer(1e-06, function () - if not session.awaiting_ack then + if not session.awaiting_ack and not session.hibernating then session.log("debug", "Sending (inside timer, before send)"); (session.sends2s or session.send)(st.stanza("r", { xmlns = session.smacks })) session.log("debug", "Sending (inside timer, after send)");