Commit 2a89283e authored by mku's avatar mku

ZP-438 #comment Non stop sync if no changes on empty sync #time 45m

git-svn-id: https://z-push.org/svn/z-push/trunk@1712 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent e0ea4d6b
...@@ -580,16 +580,9 @@ class Sync extends RequestProcessor { ...@@ -580,16 +580,9 @@ class Sync extends RequestProcessor {
$foundchanges = false; $foundchanges = false;
try { try {
// if doing an empty sync, check only once for changes // always check for changes
if ($emptysync) { ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleSync(): Entering Heartbeat mode"));
$foundchanges = $sc->CountChanges(); $foundchanges = $sc->CheckForChanges($sc->GetLifetime(), $interval);
}
// wait for changes
else {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleSync(): Entering Heartbeat mode"));
$foundchanges = $sc->CheckForChanges($sc->GetLifetime(), $interval);
}
} }
catch (StatusException $stex) { catch (StatusException $stex) {
if ($stex->getCode() == SyncCollections::OBSOLETE_CONNECTION) { if ($stex->getCode() == SyncCollections::OBSOLETE_CONNECTION) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment