diff options
author | Antipkin-A <Artem.Antipkin@onlyoffice.com> | 2022-10-05 14:05:24 +0300 |
---|---|---|
committer | Antipkin-A <Artem.Antipkin@onlyoffice.com> | 2022-10-05 14:05:24 +0300 |
commit | 3a3117fe7eb2608757ecd9ed6b238f19e4792a1a (patch) | |
tree | 8f54e7d139f7ccdd1d17ab6e46c03b59bff9e8fd | |
parent | ffd746bd0d571622c85635bc3dd9f846e3ab8546 (diff) |
don't lock if file is locked already
-rw-r--r-- | controller/callbackcontroller.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 5496897..9ccb0a8 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -613,9 +613,11 @@ class CallbackController extends Controller { case self::TrackerStatus_Editing: try { - $this->lockManager->lock(new LockContext($file, ILock::TYPE_APP, $this->appName)); + if (empty($this->lockManager->getLocks($file->getId()))) { + $this->lockManager->lock(new LockContext($file, ILock::TYPE_APP, $this->appName)); - $this->logger->debug("$this->appName has locked file $fileId", ["app" => $this->appName]); + $this->logger->debug("$this->appName has locked file $fileId", ["app" => $this->appName]); + } } catch (PreConditionNotMetException | OwnerLockedException | NoLockProviderException $e) {} $result = 0; |