This commit is contained in:
2021-02-20 12:30:35 +08:00
parent 2fdefb43c9
commit 4ab5ccae8f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -149,8 +149,8 @@ class Connection extends Pool
if (!isset($this->hasCreate[$coroutineName])) {
$this->hasCreate[$coroutineName] = 0;
}
if (Context::hasContext($coroutineName)) {
return Context::getContext($coroutineName);
if (($pdo = Context::getContext($coroutineName)) instanceof PDO) {
return $pdo;
}
if (!$this->hasItem($coroutineName)) {
$this->newClient($config, $coroutineName);