From be9c469a0fd7db777da7fcfc3bb50075058c49be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 5 Jul 2021 16:57:00 +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/Pool/ClientsPool.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/System/Pool/ClientsPool.php b/System/Pool/ClientsPool.php index 3fbacfd1..6d5573f6 100644 --- a/System/Pool/ClientsPool.php +++ b/System/Pool/ClientsPool.php @@ -182,9 +182,9 @@ class ClientsPool extends Component { if (!isset(static::$_connections[$name])) { static::$_connections[$name] = new Channel(Config::get('databases.pool.max', 10)); - if ($this->creates === -1) { - $this->creates = Timer::tick(3000, [$this, 'Heartbeat_detection']); - } + } + if ($this->creates === -1) { + $this->creates = Timer::tick(3000, [$this, 'Heartbeat_detection']); } return static::$_connections[$name]; }