Commit b1373928 authored by mku's avatar mku

ZP-370 #comment Heartbeat response is followed by sync on all folders #time 30m

git-svn-id: https://z-push.org/svn/z-push/trunk@1651 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent acbb3571
......@@ -581,11 +581,10 @@ class Sync extends RequestProcessor {
if ($loadstatus == SYNC_STATUS_SUCCESS) {
$foundchanges = false;
// wait for changes
try {
// if doing an empty sync, check only once for changes
if ($emptysync) {
$foundchanges = $sc->CountChanges();
$foundchanges = $sc->CountChanges();
}
// wait for changes
......@@ -604,9 +603,11 @@ class Sync extends RequestProcessor {
}
}
// in case of an empty sync with no changes, we can reply with an empty response
if ($emptysync && !$foundchanges){
ZLog::Write(LOGLEVEL_DEBUG, "No changes found for empty sync. Replying with empty response");
// in case there are no changes, we can reply with an empty response
if (!$foundchanges){
ZLog::Write(LOGLEVEL_DEBUG, "No changes found. Replying with empty response and closing connection.");
self::$specialHeaders = array();
self::$specialHeaders[] = "Connection: close";
return true;
}
......
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