Revert "改名"
This reverts commit fdf58326
This commit is contained in:
@@ -6,10 +6,10 @@ namespace Kiri\Pool;
|
|||||||
use Closure;
|
use Closure;
|
||||||
use Database\Mysql\PDO;
|
use Database\Mysql\PDO;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use Kiri;
|
||||||
use Kiri\Abstracts\Component;
|
use Kiri\Abstracts\Component;
|
||||||
use Kiri\Abstracts\Config;
|
use Kiri\Abstracts\Config;
|
||||||
use Kiri\Context;
|
use Kiri\Context;
|
||||||
use Kiri;
|
|
||||||
use Swoole\Error;
|
use Swoole\Error;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
@@ -126,7 +126,11 @@ class Connection extends Component
|
|||||||
*/
|
*/
|
||||||
public function initConnections($name, $isMaster, $max)
|
public function initConnections($name, $isMaster, $max)
|
||||||
{
|
{
|
||||||
$this->getPool()->initConnections($name, $isMaster, $max);
|
$pool = $this->getPool();
|
||||||
|
$pool->initConnections($name, $isMaster, $max);
|
||||||
|
for ($i = 0; $i < $max; $i++) {
|
||||||
|
$pool->push($name, $this->create($name, []));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user