diff mod_s2s_keepalive/mod_s2s_keepalive.lua @ 3723:427879b46061

mod_s2s_keepalive: Remove support for obsolete Prosody 0.8
author Kim Alvefur <zash@zash.se>
date Fri, 01 Nov 2019 14:08:10 +0100
parents 2db2c03dfb95
children 07a1faa24261
line wrap: on
line diff
--- a/mod_s2s_keepalive/mod_s2s_keepalive.lua	Sun Oct 20 19:49:03 2019 +0200
+++ b/mod_s2s_keepalive/mod_s2s_keepalive.lua	Fri Nov 01 14:08:10 2019 +0100
@@ -26,17 +26,4 @@
 	return keepalive_interval;
 end
 
-if module.add_timer then -- 0.9
-	module:add_timer(keepalive_interval, send_pings);
-else -- 0.8
-	local timer = require "util.timer";
-	local unloaded;
-	timer.add_task(keepalive_interval, function()
-		if not unloaded then
-			return send_pings()
-		end
-	end);
-	function module.unload()
-		unloaded = true
-	end
-end
+module:add_timer(keepalive_interval, send_pings);