aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-28 18:26:08 -0800
committerredmatrix <git@macgirvin.com>2016-02-28 18:26:08 -0800
commitebe70a41b9bce5b790e7621a60bd15f6c2465d02 (patch)
treed7bc5dff9c06402da20b62600616394846dbe2a0 /include/zot.php
parentda79662081b375e91477b5c83c44d084a8e579bd (diff)
downloadvolse-hubzilla-ebe70a41b9bce5b790e7621a60bd15f6c2465d02.tar.gz
volse-hubzilla-ebe70a41b9bce5b790e7621a60bd15f6c2465d02.tar.bz2
volse-hubzilla-ebe70a41b9bce5b790e7621a60bd15f6c2465d02.zip
build_sync_packet - no need to sleep after the last sync delivery.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/zot.php b/include/zot.php
index de841f956..01dd06fda 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2971,6 +2971,8 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
logger('build_sync_packet: packet: ' . print_r($info,true), LOGGER_DATA, LOG_DEBUG);
+ $total = count($synchubs);
+
foreach($synchubs as $hub) {
$hash = random_string();
$n = zot_build_packet($channel,'notify',$env_recips,$hub['hubloc_sitekey'],$hash);
@@ -2984,7 +2986,9 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
));
proc_run('php', 'include/deliver.php', $hash);
- if($interval)
+ $total = $total - 1;
+
+ if($interval && $total)
@time_sleep_until(microtime(true) + (float) $interval);
}
}