From be092295775fb1fc36c45e404c0a8696d858f6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 16 Aug 2023 14:25:19 +0800 Subject: [PATCH] qqq --- Connection.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Connection.php b/Connection.php index 399f70f..ebf130c 100644 --- a/Connection.php +++ b/Connection.php @@ -76,7 +76,7 @@ class Connection extends Component /** * @var array */ - public array $attributes = []; + public array $attributes = []; /** @@ -152,6 +152,9 @@ class Connection extends Component */ protected function getNormalClientHealth(): PDO { + if (!$this->pool()->hasItem($this->cds)) { + return $this->newConnect(); + } /** @var PDO $client */ [$client, $time] = $this->pool()->get($this->cds); if ((time() - $time) > $this->idle_time) {