changeset 785:e781e63a49f4

mod_pubsub_hub: Fix calculating next periodic check of subscriptions.
author Kim Alvefur <zash@zash.se>
date Tue, 07 Aug 2012 01:51:42 +0200
parents c6f1427da79d
children e318a341d332
files mod_pubsub_hub/mod_pubsub_hub.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_hub/mod_pubsub_hub.lua	Mon Aug 06 14:48:26 2012 +0000
+++ b/mod_pubsub_hub/mod_pubsub_hub.lua	Tue Aug 07 01:51:42 2012 +0200
@@ -183,7 +183,7 @@
 			purge = false;
 		end
 	end
-	return now - m_max(next_check - min_lease, min_lease);
+	return m_max((now - next_check) - min_lease, min_lease);
 end
 
 local function on_notify(subscription, content)