Software /
code /
prosody
Diff
plugins/mod_smacks.lua @ 12796:d7853bbc88ea 0.12
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 13 Nov 2022 18:16:59 +0100 |
parent | 12549:3729a6bdb562 |
child | 12850:101c758428aa |
line wrap: on
line diff
--- a/plugins/mod_smacks.lua Fri Nov 04 12:26:10 2022 +0000 +++ b/plugins/mod_smacks.lua Sun Nov 13 18:16:59 2022 +0100 @@ -308,7 +308,8 @@ 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;