diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index a7b6a286..3199134f 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -17,7 +17,7 @@ class ConfigService { public const LOCK_TIMEOUT = 'lock_timeout'; public $defaults = [ - self::LOCK_TIMEOUT => '0' + self::LOCK_TIMEOUT => '-1' ]; /** @var string */ diff --git a/lib/Service/LockService.php b/lib/Service/LockService.php index 1858c8ca..ecf65728 100644 --- a/lib/Service/LockService.php +++ b/lib/Service/LockService.php @@ -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 {