Changeset

12691:90d90b540b6b

mod_smacks: Set session.smacks after sending <enabled/> to fix traceback ...with opportunistic writes enabled.
author Matthew Wild <mwild1@gmail.com>
date Mon, 29 Aug 2022 15:58:51 +0100
parents 12690:546c7e0f3f31
children 12692:b001b0f42512
files plugins/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_smacks.lua	Mon Aug 29 11:47:31 2022 +0200
+++ b/plugins/mod_smacks.lua	Mon Aug 29 15:58:51 2022 +0100
@@ -349,8 +349,6 @@
 		return true;
 	end
 
-	session.smacks = xmlns_sm;
-
 	(session.sends2s or session.send)(st.stanza("enabled", {
 		xmlns = xmlns_sm;
 		id = enabled.id;
@@ -358,6 +356,7 @@
 		max = enabled.resume_max;
 	}));
 
+	session.smacks = xmlns_sm;
 	enabled.finish();
 
 	return true;