Mercurial > prosody-modules
changeset 3113:8298b06e6603
mod_pinger: work around updates on stale sessions
author | Georg Lukas <georg@op-co.de> |
---|---|
date | Wed, 13 Jun 2018 08:16:45 +0200 |
parents | ed948c75e53e |
children | 73ada978dabc |
files | mod_pinger/mod_pinger.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pinger/mod_pinger.lua Sat Jun 09 21:19:54 2018 +0200 +++ b/mod_pinger/mod_pinger.lua Wed Jun 13 08:16:45 2018 +0200 @@ -6,8 +6,10 @@ local ping_timeout = module:get_option_number("c2s_ping_timeout", 30); function update_watchdog(data, session) - session.idle_watchdog:reset(); - session.idle_pinged = nil; + if session.idle_watchdog then + session.idle_watchdog:reset(); + session.idle_pinged = nil; + end return data; end