From 17fd230ebbb5ec7a6bc2c4a3c6f70ce228c3ba4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 7 Feb 2023 17:19:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-engine/Pool/Connection.php | 2 +- kiri-engine/Pool/Pool.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kiri-engine/Pool/Connection.php b/kiri-engine/Pool/Connection.php index 897d7926..77eef671 100644 --- a/kiri-engine/Pool/Connection.php +++ b/kiri-engine/Pool/Connection.php @@ -97,7 +97,7 @@ class Connection extends Component public function get(mixed $config, bool $isMaster = false): ?\PDO { $name = $config['cds'] . ($isMaster ? 'master' : 'slave'); - if (!$this->pool->hasChannel($name, $config['pool']['max'])) { + if (!$this->pool->hasChannel($name)) { $this->pool->initConnections($name, $config['pool']['max']); } return $this->pool->get($name, $this->generate($config)); diff --git a/kiri-engine/Pool/Pool.php b/kiri-engine/Pool/Pool.php index 4925257a..953b373f 100644 --- a/kiri-engine/Pool/Pool.php +++ b/kiri-engine/Pool/Pool.php @@ -139,7 +139,7 @@ class Pool extends Component } - public function hasChannel($name, $max): bool + public function hasChannel($name): bool { $channel = static::$_connections[$name] ?? null; if (!($channel instanceof PoolQueue)) {