This commit is contained in:
2020-09-05 02:11:23 +08:00
parent d0c36c12f3
commit 346e760614
+1 -1
View File
@@ -157,7 +157,7 @@ class Connection extends Pool
return Context::getContext($coroutineName);
}
if ($this->size($coroutineName) < 1 && $this->hasCreate[$coroutineName] < $this->max) {
$this->push($coroutineName, $this->nowClient($coroutineName, $config));
return $this->saveClient($coroutineName, $this->nowClient($coroutineName, $config));
}
if (!(($client = $this->get($coroutineName)[1]) instanceof PDO)) {
throw new Exception('Connection pool overflow.');