This commit is contained in:
2021-02-20 10:58:39 +08:00
parent f5650762ba
commit 1c1b59ea0a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ class Connection extends Pool
} }
[$time, $connections] = $this->get($coroutineName); [$time, $connections] = $this->get($coroutineName);
if (!($connections instanceof PDO)) { if (!($connections instanceof PDO)) {
throw new Exception('Database exception.'); return $this->newClient($config, $coroutineName);
} }
return Context::setContext($coroutineName, $connections); return Context::setContext($coroutineName, $connections);
} }
+1 -1
View File
@@ -52,7 +52,7 @@ class Redis extends Pool
} }
[$time, $clients] = $this->get($coroutineName); [$time, $clients] = $this->get($coroutineName);
if ($clients === null) { if ($clients === null) {
throw new Exception('Redis exception.'); return $this->newClient($config, $coroutineName);
} }
return Context::setContext($coroutineName, $clients); return Context::setContext($coroutineName, $clients);
} }