This commit is contained in:
2020-09-05 01:12:47 +08:00
parent 4727c77232
commit 8540154172
+3
View File
@@ -227,6 +227,9 @@ class Connection extends Pool
*/
private function nowClient($coroutineName, $config)
{
if ($this->hasItem($coroutineName)) {
return $this->getByChannel($coroutineName, $config);
}
$client = $this->createConnect($config['cds'], $config['username'], $config['password']);
$this->success('create db client -> ' . $config['cds'] . ':' . $this->size($coroutineName));
if (isset(Context::getContext('begin_' . $coroutineName)[Coroutine::getCid()])) {