Commit eb9b42db authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1212 Randomize folderstat expiration time.

Released under the Affero GNU General Public License (AGPL) version 3.
parent ca84f48b
......@@ -1583,6 +1583,8 @@ class Sync extends RequestProcessor {
$interval = Utils::GetFiltertypeInterval($spa->GetFilterType());
$timeout = time() + (($interval && $interval < $maxTimeout) ? $interval : $maxTimeout);
// randomize timout in 12h
$timeout -= rand(0, 43200);
ZLog::Write(LOGLEVEL_DEBUG, sprintf("Sync()->setFolderStat() on %s: %s expiring %s", $spa->getFolderId(), $newFolderStat, date('Y-m-d H:i:s', $timeout)));
$spa->SetFolderStatTimeout($timeout);
}
......
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