From 9ce43895b16f6633d344a2995cf0865c431e75f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 8 Jun 2022 14:43:23 +0800 Subject: [PATCH] modify plugin name --- Connection.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Connection.php b/Connection.php index d30cf1a..445f003 100644 --- a/Connection.php +++ b/Connection.php @@ -87,8 +87,6 @@ class Connection extends Component /** * @return void - * @throws ContainerExceptionInterface - * @throws NotFoundExceptionInterface * @throws Exception */ public function init() @@ -120,10 +118,10 @@ class Connection extends Component { $connections = $this->connections(); $pool = Config::get('databases.pool.max', 10); - - $connections->initConnections('Mysql:' . $this->cds, $pool); if (!empty($this->slaveConfig) && $this->cds != $this->slaveConfig['cds']) { $connections->initConnections('Mysql:' . $this->slaveConfig['cds'], $pool); + } else { + $connections->initConnections('Mysql:' . $this->cds, $pool); } }