From 6fb55812abc78a9e33f04e332bff6c5c474425f9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 7 Jan 2020 11:19:31 +0100 Subject: [PATCH] [HttpKernel] release lock explicitly --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index f21a88b3b44d..dda645a6fca2 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -556,7 +556,7 @@ public function write($content, array $metadata = null) } } - public function __destruct() + public function release() { flock($this->lock, LOCK_UN); fclose($this->lock); @@ -634,7 +634,7 @@ public function __destruct() } $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); - unset($cache); + $cache->release(); $this->container = require $cachePath; $this->container->set('kernel', $this);