diff options
author | Kim Alvefur <zash@zash.se> | 2022-11-13 18:16:59 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-11-13 18:16:59 +0100 |
commit | d158455de6ea757b2f391e3a7470a5c8429a6c92 (patch) | |
tree | b81c9730bf5e3d4509182858c3ebf8211d880451 /plugins | |
parent | d4daf40caa518a89e51222e6e1d9c230db02839a (diff) | |
download | prosody-d158455de6ea757b2f391e3a7470a5c8429a6c92.tar.gz prosody-d158455de6ea757b2f391e3a7470a5c8429a6c92.zip |
mod_smacks: Disable resumption behavior on s2s
Since resumption is not supported on s2s currently, there is no point in
allocating resumption tokens. The code that removes entries from
session_registry is only invoked for c2s sessions, thus enabling
resumable smacks on s2s adds an entry that never goes away.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_smacks.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua index 3a4c7b84..23ac2b51 100644 --- a/plugins/mod_smacks.lua +++ b/plugins/mod_smacks.lua @@ -308,7 +308,8 @@ function handle_enable(session, stanza, xmlns_sm) local resume_max; local resume_token; local resume = stanza.attr.resume; - if resume == "true" or resume == "1" then + if (resume == "true" or resume == "1") and session.username then + -- resumption on s2s is not currently supported resume_token = new_id(); session_registry[jid.join(session.username, session.host, resume_token)] = session; session.resumption_token = resume_token; |