Skip to content

Commit

Permalink
Merge pull request #6061 from nextcloud/backport/6059/stable-3.9
Browse files Browse the repository at this point in the history
[stable-3.9] do not check every 5 seconds files with infinite timeout (= 0)
  • Loading branch information
mgallien authored Sep 14, 2023
2 parents f1d4dcb + da58696 commit da24046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
}

// We want to check the lock state of this file after the lock time has expired
if(serverEntry.locked == SyncFileItem::LockStatus::LockedItem) {
if(serverEntry.locked == SyncFileItem::LockStatus::LockedItem && serverEntry.lockTimeout > 0) {
const auto lockExpirationTime = serverEntry.lockTime + serverEntry.lockTimeout;
const auto timeRemaining = QDateTime::currentDateTime().secsTo(QDateTime::fromSecsSinceEpoch(lockExpirationTime));
// Add on a second as a precaution, sometimes we catch the server before it has had a chance to update
Expand Down

0 comments on commit da24046

Please sign in to comment.