# HG changeset patch # User Kim Alvefur # Date 1613499381 -3600 # Node ID 74da3643c62dc0332895765ac9a2dbe630e79c47 # Parent 58a112bd979205a598c99449bb6944f38d3879f3 mod_smacks: Don't ask for acks while in (csi) inactive mode The acks count as high priority events in mod_csi_simple and since they're sent after each stanza, it negated all optimizations. diff -r 58a112bd9792 -r 74da3643c62d mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Thu Feb 11 15:51:27 2021 +0100 +++ b/mod_smacks/mod_smacks.lua Tue Feb 16 19:16:21 2021 +0100 @@ -162,7 +162,7 @@ local queue = session.outgoing_stanza_queue; local expected_h = session.last_acknowledged_stanza + #queue; -- session.log("debug", "*** SMACKS(1) ***: awaiting_ack=%s, hibernating=%s", tostring(session.awaiting_ack), tostring(session.hibernating)); - if session.awaiting_ack == nil and not session.hibernating then + if session.awaiting_ack == nil and not session.hibernating and session.state ~= "inactive" then -- this check of last_requested_h prevents ack-loops if missbehaving clients report wrong -- stanza counts. it is set when an is really sent (e.g. inside timer), preventing any -- further requests until a higher h-value would be expected.