This commit is contained in:
2020-10-16 17:06:59 +08:00
parent 9832d3bf22
commit 541400bb96
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -235,7 +235,6 @@ class Connection extends Pool
*/
private function nowClient($coroutineName, $config)
{
$this->success('create db client -> ' . $config['cds'] . ':' . $this->hasCreate[$coroutineName] . ':' . $this->size($coroutineName));
$client = $this->createConnect($coroutineName, ...$this->parseConfig($config));
if ($number = Context::getContext('begin_' . $coroutineName, Coroutine::getCid())) {
$number > 0 && $client->beginTransaction();
@@ -372,6 +371,7 @@ class Connection extends Pool
if (!empty($charset)) {
$link->query('SET NAMES ' . $charset);
}
$this->success('create db client -> ' . $cds . ':' . $this->hasCreate[$coroutineName] . ':' . $this->size($coroutineName));
$this->incr($coroutineName);
return $link;
} catch (\Throwable $exception) {