Commit 31ac7f93 authored by skummer's avatar skummer

ZP-114 related

- fixed: SyncCollections->WaitForChanges() only triggers notifications on one folder

git-svn-id: https://z-push.org/svn/z-push/trunk@1318 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 30e5c99d
...@@ -490,16 +490,19 @@ class SyncCollections implements Iterator { ...@@ -490,16 +490,19 @@ class SyncCollections implements Iterator {
ZPush::GetTopCollector()->AnnounceInformation(sprintf("Sink %d/%ds on %s", ($now-$started), $lifetime, $checkClasses)); ZPush::GetTopCollector()->AnnounceInformation(sprintf("Sink %d/%ds on %s", ($now-$started), $lifetime, $checkClasses));
$notifications = ZPush::GetBackend()->ChangesSink($nextInterval); $notifications = ZPush::GetBackend()->ChangesSink($nextInterval);
$validNotifications = false;
foreach ($notifications as $folderid) { foreach ($notifications as $folderid) {
// check if the notification on the folder is within our filter // check if the notification on the folder is within our filter
if ($this->CountChange($folderid)) { if ($this->CountChange($folderid)) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->CheckForChanges(): Notification received on folder '%s'", $folderid)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->CheckForChanges(): Notification received on folder '%s'", $folderid));
return true; $validNotifications = true;
} }
else { else {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->CheckForChanges(): Notification received on folder '%s', but it is not relevant", $folderid)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->CheckForChanges(): Notification received on folder '%s', but it is not relevant", $folderid));
} }
} }
if ($validNotifications)
return true;
} }
// use polling mechanism // use polling mechanism
else { else {
......
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