From 59d9f65508133a34893c2ec761a6db3299c93714 Mon Sep 17 00:00:00 2001 From: Dmytro Dzubenko Date: Fri, 11 Dec 2020 18:04:16 +0200 Subject: [PATCH] Handle store exception on exists check --- src/Symfony/Component/Lock/Store/CombinedStore.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Lock/Store/CombinedStore.php b/src/Symfony/Component/Lock/Store/CombinedStore.php index f6e9319359175..8d0526b088466 100644 --- a/src/Symfony/Component/Lock/Store/CombinedStore.php +++ b/src/Symfony/Component/Lock/Store/CombinedStore.php @@ -199,9 +199,14 @@ public function exists(Key $key) $storesCount = \count($this->stores); foreach ($this->stores as $store) { - if ($store->exists($key)) { - ++$successCount; - } else { + try { + if ($store->exists($key)) { + ++$successCount; + } else { + ++$failureCount; + } + } catch (\Exception $e) { + $this->logger->debug('One store failed to check the "{resource}" lock.', ['resource' => $key, 'store' => $store, 'exception' => $e]); ++$failureCount; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy