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)) {