Mercurial > prosody-modules
comparison mod_presence_cache/mod_presence_cache.lua @ 3760:830a01443a2f
mod_presence_cache: Fix traceback due to changes in trunk
Reason used to be a string and now it might be an util.error
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 09 Dec 2019 16:51:36 +0100 |
parents | 322e8e7ba7d4 |
children |
comparison
equal
deleted
inserted
replaced
3759:57eb248f6dd3 | 3760:830a01443a2f |
---|---|
101 | 101 |
102 module:hook("pre-presence/bare", answer_probe_from_cache, 10); | 102 module:hook("pre-presence/bare", answer_probe_from_cache, 10); |
103 | 103 |
104 local function clear_cache_from_s2s(remote, reason) | 104 local function clear_cache_from_s2s(remote, reason) |
105 if not remote then return end | 105 if not remote then return end |
106 if reason and reason:find("timeout") then return end -- Ignore connections closed for being idle | 106 -- FIXME Ignore if connection closed for being idle |
107 | 107 |
108 module:log("debug", "Dropping cached presence from host %s", remote); | 108 module:log("debug", "Dropping cached presence from host %s", remote); |
109 | 109 |
110 for bare, cached in pairs(bare_cache) do | 110 for bare, cached in pairs(bare_cache) do |
111 if jid_host(bare) == remote then | 111 if jid_host(bare) == remote then |