Software /
code /
prosody-modules
Changeset
2672:75ab061069aa
mod_pinger: Don't ping when smacks hibernated the session, fixes #712
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Thu, 06 Apr 2017 02:35:06 +0200 |
parents | 2671:80b6c63cb559 |
children | 2673:2e1a4740adee |
files | mod_pinger/mod_pinger.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pinger/mod_pinger.lua Thu Apr 06 02:31:16 2017 +0200 +++ b/mod_pinger/mod_pinger.lua Thu Apr 06 02:35:06 2017 +0200 @@ -48,3 +48,7 @@ module:hook("resource-bind", function (event) watch_session(event.session); end); module:hook("resource-unbind", function (event) unwatch_session(event.session); end); + +-- handle smacks sessions properly (not pinging in hibernated state) +module:hook("smacks-hibernation-start", function (event) unwatch_session(event.origin); end); +module:hook("smacks-hibernation-end", function (event) watch_session(event.origin); end);