This commit is contained in:
2023-02-07 17:01:45 +08:00
parent 73561a8983
commit dfbfa701e5
+2 -2
View File
@@ -120,11 +120,11 @@ class Connection extends Component
if (!empty($this->slaveConfig) && $this->cds != $this->slaveConfig['cds']) {
$pool = $this->pool ?? ['max' => 10, 'min' => 1];
$this->connection->initConnections('Mysql:' . $this->slaveConfig['cds'], $pool);
$this->connection->initConnections('Mysql:' . $this->slaveConfig['cds'], $pool['max']);
} else {
$pool = $this->slaveConfig['pool'] ?? ['max' => 10, 'min' => 1];
$this->connection->initConnections('Mysql:' . $this->cds, $pool);
$this->connection->initConnections('Mysql:' . $this->cds, $pool['max']);
}
}