From a04e120424b93ff9633b9bcf85ee1fafcd00dcc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 3 Feb 2021 18:53:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Abstracts/Pool.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index 97f7d979..a156a189 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -53,8 +53,10 @@ abstract class Pool extends Component return [0, null]; } [$timeout, $connection] = $this->_items[$name]->pop(30); + if (empty($timeout) || empty($connection)) { + return [0, null]; + } if (!$this->checkCanUse($name, $timeout, $connection)) { - unset($client); return [0, null]; } else { return [$timeout, $connection];