aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-08-29 15:58:51 +0100
committerMatthew Wild <mwild1@gmail.com>2022-08-29 15:58:51 +0100
commit78a197c25d6b0658f5745f3010190856fcf0ffb2 (patch)
tree2c3055e43600dda29d269b6915a50ff0f0bba746 /plugins
parent03b3b1b9ad4b6a0b749d0345b34591694bb0cd90 (diff)
downloadprosody-78a197c25d6b0658f5745f3010190856fcf0ffb2.tar.gz
prosody-78a197c25d6b0658f5745f3010190856fcf0ffb2.zip
mod_smacks: Set session.smacks after sending <enabled/> to fix traceback
...with opportunistic writes enabled.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_smacks.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index b3f6d189..6f257ba5 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -349,8 +349,6 @@ function handle_enable(session, stanza, xmlns_sm)
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 @@ function handle_enable(session, stanza, xmlns_sm)
max = enabled.resume_max;
}));
+ session.smacks = xmlns_sm;
enabled.finish();
return true;