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,7 +581,6 @@ class Sync extends RequestProcessor { ...@@ -581,7 +581,6 @@ class Sync extends RequestProcessor {
if ($loadstatus == SYNC_STATUS_SUCCESS) { if ($loadstatus == SYNC_STATUS_SUCCESS) {
$foundchanges = false; $foundchanges = false;
// wait for changes
try { try {
// if doing an empty sync, check only once for changes // if doing an empty sync, check only once for changes
if ($emptysync) { if ($emptysync) {
...@@ -604,9 +603,11 @@ class Sync extends RequestProcessor { ...@@ -604,9 +603,11 @@ class Sync extends RequestProcessor {
} }
} }
// in case of an empty sync with no changes, we can reply with an empty response // in case there are no changes, we can reply with an empty response
if ($emptysync && !$foundchanges){ if (!$foundchanges){
ZLog::Write(LOGLEVEL_DEBUG, "No changes found for empty sync. Replying with empty response"); ZLog::Write(LOGLEVEL_DEBUG, "No changes found. Replying with empty response and closing connection.");
self::$specialHeaders = array();
self::$specialHeaders[] = "Connection: close";
return true; 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