Changeset

12550:12962a1001c2

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 13 Jun 2022 19:17:36 +0200
parents 12548:5133d6e48686 (current diff) 12549:3729a6bdb562 (diff)
children 12551:3b7e97e0a8ef
files plugins/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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