From c208d023e7d1e38a5b8131b5d04261fb9460f521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 16 Aug 2023 16:38:33 +0800 Subject: [PATCH] qqq --- Connection.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Connection.php b/Connection.php index bb5fad3..e771b85 100644 --- a/Connection.php +++ b/Connection.php @@ -153,7 +153,11 @@ class Connection extends Component */ protected function getNormalClientHealth(): PDO { - [$client, $time] = $this->pool()->get($this->cds, $this->waite_time); + $data = $this->pool()->get($this->cds, $this->waite_time); + if ($data === false) { + throw new Exception('Pool waite timeout at ' . $this->waite_time); + } + [$client, $time] = $data; if ((time() - $time) < $this->idle_time || $this->canUse($client)) { return $client;