From eaf3fb3c7584b9da6d7408f8a4c267581c099ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 5 Sep 2020 02:31:08 +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 | 2 +- System/Pool/Connection.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index 7656d9dc..c0e66727 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -43,7 +43,7 @@ abstract class Pool extends Component */ protected function get($name) { - [$timeout, $connection] = $this->_items[$name]->pop(1); + [$timeout, $connection] = $this->_items[$name]->pop(); if (!$this->checkCanUse($name, $timeout, $connection)) { unset($client); return [0, null]; diff --git a/System/Pool/Connection.php b/System/Pool/Connection.php index e1e55ce7..7ab3db02 100644 --- a/System/Pool/Connection.php +++ b/System/Pool/Connection.php @@ -265,9 +265,9 @@ class Connection extends Pool public function checkCanUse($name, $time, $connect) { try { - if ($time + 60 * 10 < time()) { - return $result = false; - } +// if ($time + 60 * 10 < time()) { +// return $result = false; +// } if (empty($connect) || !($connect instanceof PDO)) { return $result = false; }