From 0b4373816230aa2c2e3d864fbf8a83a116f65c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C5=A1a=20Stamenkovi=C4=87?= Date: Thu, 13 Sep 2018 20:01:11 +0200 Subject: [PATCH] Think positive --- src/Symfony/Component/Lock/Lock.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Lock/Lock.php b/src/Symfony/Component/Lock/Lock.php index 77fd032bf1..9cd15dd40b 100644 --- a/src/Symfony/Component/Lock/Lock.php +++ b/src/Symfony/Component/Lock/Lock.php @@ -69,10 +69,10 @@ final class Lock implements LockInterface, LoggerAwareInterface public function acquire($blocking = false) { try { - if (!$blocking) { - $this->store->save($this->key); - } else { + if ($blocking) { $this->store->waitAndSave($this->key); + } else { + $this->store->save($this->key); } $this->dirty = true;