diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-08-29 15:58:51 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-08-29 15:58:51 +0100 |
commit | 78a197c25d6b0658f5745f3010190856fcf0ffb2 (patch) | |
tree | 2c3055e43600dda29d269b6915a50ff0f0bba746 | |
parent | 03b3b1b9ad4b6a0b749d0345b34591694bb0cd90 (diff) | |
download | prosody-78a197c25d6b0658f5745f3010190856fcf0ffb2.tar.gz prosody-78a197c25d6b0658f5745f3010190856fcf0ffb2.zip |
mod_smacks: Set session.smacks after sending <enabled/> to fix traceback
...with opportunistic writes enabled.
-rw-r--r-- | plugins/mod_smacks.lua | 3 |
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; |