# HG changeset patch # User tmolitor # Date 1610916756 -3600 # Node ID 31afa4f314cc77d1704121ed55ba1cd56ef8ca20 # Parent d61d7d30f38d66ea4b965fd75ebd0f185cc4f07a mod_cloud_notify: Fix handling of push_queue smacks-hibernating while the push_queue had a timer running resulted in push not working for this session anymore. diff -r d61d7d30f38d -r 31afa4f314cc mod_cloud_notify/mod_cloud_notify.lua --- a/mod_cloud_notify/mod_cloud_notify.lua Sun Jan 17 18:11:19 2021 +0000 +++ b/mod_cloud_notify/mod_cloud_notify.lua Sun Jan 17 21:52:36 2021 +0100 @@ -438,7 +438,7 @@ if not session.push_queue then session.push_queue = {}; end local queue = session.push_queue; queue[#queue+1] = st.clone(stanza); - if #queue == 1 then -- first stanza --> start timer + if not session.awaiting_push_timer then -- timer not already running --> start new timer session.log("debug", "Invoking cloud handle_notify_request() for newly smacks queued stanza (in a moment)"); session.awaiting_push_timer = module:add_timer(1.0, function () session.log("debug", "Invoking cloud handle_notify_request() for newly smacks queued stanzas (now in timer)");