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); }