Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Service/ConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ConfigService {
public const LOCK_TIMEOUT = 'lock_timeout';

public $defaults = [
self::LOCK_TIMEOUT => '0'
self::LOCK_TIMEOUT => '-1'
];

/** @var string */
Expand Down
8 changes: 3 additions & 5 deletions lib/Service/LockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,9 @@ public function unlockFile(int $fileId, string $userId, bool $force = false, int
*/
public function getDeprecatedLocks(int $limit = 0): array {
$timeout = (int)$this->configService->getAppValue(ConfigService::LOCK_TIMEOUT);
if ($timeout === 0) {
$this->logger->notice(
'ConfigService::LOCK_TIMEOUT is not numerical, using default', ['current' => $timeout, 'exception' => new \Exception()]
);
$timeout = (int)$this->configService->defaults[ConfigService::LOCK_TIMEOUT];

if ($timeout === FileLock::ETA_INFINITE) {
return [];
}

try {
Expand Down
Loading