From 6cff229b6a77282c1d0b613b920ff4a6c16ebfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 5 Sep 2020 01:56:35 +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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index 0965a7be..44619c76 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -43,6 +43,9 @@ abstract class Pool extends Component */ protected function get($name) { + if ($this->_items[$name]->length() < 1) { + return [0, null]; + } [$timeout, $connection] = $this->_items[$name]->pop(); if (!$this->checkCanUse($name, $timeout, $connection)) { unset($client);