mod_cloud_notify/mod_cloud_notify.lua
changeset 5056 d7ece68de066
parent 5000 031e0dd90f4b
child 5057 00e8cc6860cb
equal deleted inserted replaced
5055:2718652c18ca 5056:d7ece68de066
   512 -- smacks hibernation is started
   512 -- smacks hibernation is started
   513 local function hibernate_session(event)
   513 local function hibernate_session(event)
   514 	local session = event.origin;
   514 	local session = event.origin;
   515 	local queue = event.queue;
   515 	local queue = event.queue;
   516 	session.first_hibernated_push = nil;
   516 	session.first_hibernated_push = nil;
   517 	if session.hibernating_watchdog then		-- check for prosody 0.12 mod_smacks
   517 	if session.push_identifier and session.hibernating_watchdog then -- check for prosody 0.12 mod_smacks
   518 		-- save old watchdog callback and timeout
   518 		-- save old watchdog callback and timeout
   519 		session.original_smacks_callback = session.hibernating_watchdog.callback;
   519 		session.original_smacks_callback = session.hibernating_watchdog.callback;
   520 		session.original_smacks_timeout = session.hibernating_watchdog.timeout;
   520 		session.original_smacks_timeout = session.hibernating_watchdog.timeout;
   521 		-- cancel old watchdog and create a new watchdog with extended timeout
   521 		-- cancel old watchdog and create a new watchdog with extended timeout
   522 		session.hibernating_watchdog:cancel();
   522 		session.hibernating_watchdog:cancel();