Merge 0.12->trunk
authorKim Alvefur <zash@zash.se>
Mon, 13 Jun 2022 19:17:36 +0200
changeset 12554 12962a1001c2
parent 12552 5133d6e48686 (current diff)
parent 12553 3729a6bdb562 (diff)
child 12555 3b7e97e0a8ef
Merge 0.12->trunk
plugins/mod_smacks.lua
--- a/plugins/mod_smacks.lua	Mon Jun 13 18:41:13 2022 +0200
+++ b/plugins/mod_smacks.lua	Mon Jun 13 19:17:36 2022 +0200
@@ -173,9 +173,9 @@
 local function request_ack(session, reason)
 	local queue = session.outgoing_stanza_queue;
 	session.log("debug", "Sending <r> from %s - #queue=%d", reason, queue:count_unacked());
+	session.awaiting_ack = true;
 	(session.sends2s or session.send)(st.stanza("r", { xmlns = session.smacks }))
 	if session.destroyed then return end -- sending something can trigger destruction
-	session.awaiting_ack = true;
 	-- expected_h could be lower than this expression e.g. more stanzas added to the queue meanwhile)
 	session.last_requested_h = queue:count_acked() + queue:count_unacked();
 	if not session.delayed_ack_timer then