Software /
code /
prosody-modules
Comparison
mod_smacks/mod_smacks.lua @ 4632:ab7dc5c5c782
mod_smacks: Fix typo in comment (thanks codespell)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 27 Jul 2021 00:21:42 +0200 |
parent | 4631:921c607617b0 |
child | 4637:242251ce1036 |
comparison
equal
deleted
inserted
replaced
4631:921c607617b0 | 4632:ab7dc5c5c782 |
---|---|
497 -- Check the hibernate time still matches what we think it is, | 497 -- Check the hibernate time still matches what we think it is, |
498 -- otherwise the session resumed and re-hibernated. | 498 -- otherwise the session resumed and re-hibernated. |
499 and session.hibernating == hibernate_time then | 499 and session.hibernating == hibernate_time then |
500 -- wait longer if the timeout isn't reached because push was enabled for this session | 500 -- wait longer if the timeout isn't reached because push was enabled for this session |
501 -- session.first_hibernated_push is the starting point for hibernation timeouts of those push enabled clients | 501 -- session.first_hibernated_push is the starting point for hibernation timeouts of those push enabled clients |
502 -- wait for an additional resume_timeout seconds if no push occured since hibernation at all | 502 -- wait for an additional resume_timeout seconds if no push occurred since hibernation at all |
503 local current_time = os_time(); | 503 local current_time = os_time(); |
504 local timeout_start = math_max(session.hibernating, session.first_hibernated_push or session.hibernating); | 504 local timeout_start = math_max(session.hibernating, session.first_hibernated_push or session.hibernating); |
505 if session.push_identifier ~= nil and not session.first_hibernated_push then | 505 if session.push_identifier ~= nil and not session.first_hibernated_push then |
506 session.log("debug", "No push happened since hibernation started, hibernating session for up to %d extra seconds", resume_timeout); | 506 session.log("debug", "No push happened since hibernation started, hibernating session for up to %d extra seconds", resume_timeout); |
507 return resume_timeout; | 507 return resume_timeout; |