From 4e978cf919561b5adcb489745501c91623a32326 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Thu, 6 Apr 2023 22:47:34 +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 --- Connection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Connection.php b/Connection.php index 19e4c6f..ff45732 100644 --- a/Connection.php +++ b/Connection.php @@ -91,8 +91,6 @@ class Connection extends Component public function __construct(public EventProvider $eventProvider, public Pool $connections, public ContainerInterface $container, array $config = []) { parent::__construct($config); - - $this->initConnections(); } @@ -106,6 +104,8 @@ class Connection extends Component $this->eventProvider->on(BeginTransaction::class, [$this, 'beginTransaction'], 0); $this->eventProvider->on(Rollback::class, [$this, 'rollback'], 0); $this->eventProvider->on(Commit::class, [$this, 'commit'], 0); + + $this->initConnections(); }