Commit a8a62934 authored by skummer's avatar skummer

ZP-128

- fixed: only check for processed heartbeat changes if we really had to wait for changes

git-svn-id: https://z-push.org/svn/z-push/trunk@1338 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 79b790f9
...@@ -573,7 +573,7 @@ class Sync extends RequestProcessor { ...@@ -573,7 +573,7 @@ class Sync extends RequestProcessor {
foreach ($sc->GetChangedFolderIds() as $folderid => $changecount) { foreach ($sc->GetChangedFolderIds() as $folderid => $changecount) {
// check if there were other sync requests for a folder during the heartbeat // check if there were other sync requests for a folder during the heartbeat
$spa = $sc->GetCollection($folderid); $spa = $sc->GetCollection($folderid);
if ($changecount > 0 && self::$deviceManager->CheckHearbeatStateIntegrity($spa->GetFolderId(), $spa->GetUuid(), $spa->GetUuidCounter())) { if ($changecount > 0 && $sc->WaitedForChanges() && self::$deviceManager->CheckHearbeatStateIntegrity($spa->GetFolderId(), $spa->GetUuid(), $spa->GetUuidCounter())) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleSync(): heartbeat: found %d changes in '%s' which was already synchronized. Heartbeat aborted!", $changecount, $folderid)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleSync(): heartbeat: found %d changes in '%s' which was already synchronized. Heartbeat aborted!", $changecount, $folderid));
$status = SYNC_COMMONSTATUS_SYNCSTATEVERSIONINVALID; $status = SYNC_COMMONSTATUS_SYNCSTATEVERSIONINVALID;
} }
......
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