Changeset

4442:74da3643c62d

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.
author Kim Alvefur <zash@zash.se>
date Tue, 16 Feb 2021 19:16:21 +0100
parents 4441:58a112bd9792
children 4443:0a56dc6c61af
files mod_smacks/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 <r> is really sent (e.g. inside timer), preventing any
 		-- further requests until a higher h-value would be expected.