Comparison

mod_pubsub_hub/mod_pubsub_hub.lua @ 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
parent 767:e5667f1da6bf
child 801:133ee88d19ae
comparison
equal deleted inserted replaced
784:c6f1427da79d 785:e781e63a49f4
181 end 181 end
182 subs_by_topic[topic] = new_callbacks; 182 subs_by_topic[topic] = new_callbacks;
183 purge = false; 183 purge = false;
184 end 184 end
185 end 185 end
186 return now - m_max(next_check - min_lease, min_lease); 186 return m_max((now - next_check) - min_lease, min_lease);
187 end 187 end
188 188
189 local function on_notify(subscription, content) 189 local function on_notify(subscription, content)
190 local body = tostring(content); 190 local body = tostring(content);
191 local headers = { 191 local headers = {