Diff

plugins/mod_smacks.lua @ 12550:12962a1001c2

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 13 Jun 2022 19:17:36 +0200
parent 12528:8e780079a424
parent 12549:3729a6bdb562
child 12677:3b9771d496ed
line wrap: on
line diff
--- 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