# HG changeset patch # User Kim Alvefur # Date 1344297102 -7200 # Node ID e781e63a49f41a9c8a5a4645b3033f41fc2df575 # Parent c6f1427da79d68f2756c5123ca5d052f18387dc5 mod_pubsub_hub: Fix calculating next periodic check of subscriptions. diff -r c6f1427da79d -r e781e63a49f4 mod_pubsub_hub/mod_pubsub_hub.lua --- 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)