Page MenuHomePhorge

D5430.1775281624.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D5430.1775281624.diff

diff --git a/lib/ext/Syncroton/Command/FolderSync.php b/lib/ext/Syncroton/Command/FolderSync.php
--- a/lib/ext/Syncroton/Command/FolderSync.php
+++ b/lib/ext/Syncroton/Command/FolderSync.php
@@ -119,7 +119,9 @@
if ($this->_logger instanceof Zend_Log) {
$this->_logger->info(__METHOD__ . '::' . __LINE__ . " already known synckey $syncKey provided ($retryCounter times)");
}
+ $sleepTime = 2;
if ($retryCounter >= 10) {
+ $sleepTime = 10;
if ($this->_logger instanceof Zend_Log) {
$this->_logger->warn(__METHOD__ . '::' . __LINE__ . " This client is stuck on resending the same FolderSync synckey.");
}
@@ -128,6 +130,10 @@
$this->_syncState->extraData = json_encode($extraData);
$this->_syncStateBackend->update($this->_syncState);
}
+ // Throttle clients that are stuck in a loop.
+ // We shouldn't normally hit this codepath, so this does not have any impact on regular synchronization at all,
+ // but protects us from too many requests from clients that are stuck in a loop.
+ sleep($sleepTime);
}
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 5:47 AM (6 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18828286
Default Alt Text
D5430.1775281624.diff (1 KB)

Event Timeline