Software /
code /
prosody
Comparison
plugins/mod_smacks.lua @ 13023:cbe58f747d48
Merge 0.12->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 04 Apr 2023 08:55:15 +0200 |
parent | 12977:74b9e05af71e |
parent | 13022:a313b7260145 |
child | 13209:c8d949cf6b09 |
comparison
equal
deleted
inserted
replaced
13020:3174308d127e | 13023:cbe58f747d48 |
---|---|
519 return | 519 return |
520 end | 520 end |
521 if session.hibernating then return end | 521 if session.hibernating then return end |
522 | 522 |
523 session.hibernating = os_time(); | 523 session.hibernating = os_time(); |
524 session.hibernating_watchdog = watchdog.new(resume_timeout, function() | 524 if session.hibernating_watchdog then |
525 session.log("debug", "Session already has a sleeping watchdog, replacing it"); | |
526 session.hibernating_watchdog:cancel(); | |
527 end | |
528 session.hibernating_watchdog = watchdog.new(resume_timeout, function(this_dog) | |
529 if this_dog ~= session.hibernating_watchdog then | |
530 -- This really shouldn't happen? | |
531 session.log("debug", "Releasing a stray watchdog"); | |
532 return | |
533 end | |
525 session.log("debug", "mod_smacks hibernation timeout reached..."); | 534 session.log("debug", "mod_smacks hibernation timeout reached..."); |
526 if session.destroyed then | 535 if session.destroyed then |
527 session.log("debug", "The session has already been destroyed"); | 536 session.log("debug", "The session has already been destroyed"); |
528 return | 537 return |
529 elseif not session.resumption_token then | 538 elseif not session.resumption_token then |