From c483738a8f49c0de72037439d6a7dbfd5ebf2832 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Tue, 23 Feb 2021 00:42:44 +0800 Subject: [PATCH] modify --- System/Pool/ObjectPool.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/System/Pool/ObjectPool.php b/System/Pool/ObjectPool.php index 620b8d3e..a62b6a58 100644 --- a/System/Pool/ObjectPool.php +++ b/System/Pool/ObjectPool.php @@ -34,6 +34,9 @@ class ObjectPool extends \Snowflake\Abstracts\Pool */ public function getConnection(array $config, bool $isMaster): mixed { + if (is_object($config[0])) { + return $config[0]; + } return $this->get(md5($config[0]), $config); }