变更
This commit is contained in:
@@ -100,7 +100,6 @@ class Connection extends Component
|
|||||||
if (!$this->pool->hasChannel($name)) {
|
if (!$this->pool->hasChannel($name)) {
|
||||||
$this->pool->initConnections($name, $config['pool']['max']);
|
$this->pool->initConnections($name, $config['pool']['max']);
|
||||||
}
|
}
|
||||||
var_dump(Context::getAllContext());
|
|
||||||
if (!Context::hasContext($name)) {
|
if (!Context::hasContext($name)) {
|
||||||
return Context::setContext($name, $this->pool->get($name, $this->generate($config)));
|
return Context::setContext($name, $this->pool->get($name, $this->generate($config)));
|
||||||
} else {
|
} else {
|
||||||
@@ -172,9 +171,6 @@ class Connection extends Component
|
|||||||
public function addItem(string $name, PDO $PDO): void
|
public function addItem(string $name, PDO $PDO): void
|
||||||
{
|
{
|
||||||
$this->pool->push($name, $PDO);
|
$this->pool->push($name, $PDO);
|
||||||
if (Context::inCoroutine()) {
|
|
||||||
Context::remove($name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user