From 1c1b59ea0abe5d652fbb869dfdf88aefeda942f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 20 Feb 2021 10:58:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Pool/Connection.php | 2 +- System/Pool/Redis.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/System/Pool/Connection.php b/System/Pool/Connection.php index ebd722b0..7b192afb 100644 --- a/System/Pool/Connection.php +++ b/System/Pool/Connection.php @@ -157,7 +157,7 @@ class Connection extends Pool } [$time, $connections] = $this->get($coroutineName); if (!($connections instanceof PDO)) { - throw new Exception('Database exception.'); + return $this->newClient($config, $coroutineName); } return Context::setContext($coroutineName, $connections); } diff --git a/System/Pool/Redis.php b/System/Pool/Redis.php index e589e6a8..b5d9d388 100644 --- a/System/Pool/Redis.php +++ b/System/Pool/Redis.php @@ -52,7 +52,7 @@ class Redis extends Pool } [$time, $clients] = $this->get($coroutineName); if ($clients === null) { - throw new Exception('Redis exception.'); + return $this->newClient($config, $coroutineName); } return Context::setContext($coroutineName, $clients); }