This commit is contained in:
2023-03-31 10:30:39 +08:00
parent bb41e1052f
commit 8f1d367484
+2
View File
@@ -100,6 +100,8 @@ class Connection extends Component
if (!$this->pool->hasChannel($name)) {
$this->pool->initConnections($name, $config['pool']['max']);
}
return $this->pool->get($name, $this->generate($config));
if (!Context::hasContext($name)) {
return Context::setContext($name, $this->pool->get($name, $this->generate($config)));
} else {