Mercurial > prosody-modules
changeset 4445:e13eb0f851c8
mod_smacks: Explicitly request ack when leaving CSI-inactive mode
There may be a lot of unacked stanzas in the queue, might as well...
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 16 Feb 2021 22:49:44 +0100 |
parents | 2f5e52d67928 |
children | 3d593b612e07 |
files | mod_smacks/mod_smacks.lua |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua Tue Feb 16 21:33:39 2021 +0100 +++ b/mod_smacks/mod_smacks.lua Tue Feb 16 22:49:44 2021 +0100 @@ -2,7 +2,7 @@ -- -- Copyright (C) 2010-2015 Matthew Wild -- Copyright (C) 2010 Waqas Hussain --- Copyright (C) 2012-2015 Kim Alvefur +-- Copyright (C) 2012-2021 Kim Alvefur -- Copyright (C) 2012 Thijs Alkemade -- Copyright (C) 2014 Florian Zeitz -- Copyright (C) 2016-2020 Thilo Molitor @@ -641,6 +641,10 @@ module:hook_stanza(xmlns_sm2, "resume", function (session, stanza) return handle_resume(session, stanza, xmlns_sm2); end); module:hook_stanza(xmlns_sm3, "resume", function (session, stanza) return handle_resume(session, stanza, xmlns_sm3); end); +module:hook("csi-client-active", function (event) + request_ack_if_needed(event.origin, true, "csi-active", nil); +end); + local function handle_read_timeout(event) local session = event.session; if session.smacks then