diff --git a/kiri-engine/Pool/Connection.php b/kiri-engine/Pool/Connection.php index da6ac0a4..48a22de8 100644 --- a/kiri-engine/Pool/Connection.php +++ b/kiri-engine/Pool/Connection.php @@ -116,25 +116,6 @@ class Connection extends Component } - /** - * @param $config - * @return Closure - */ - public function create($config): Closure - { - return function () use ($config) { - if ($this->total >= 300) { - $connect = $this->pool->waite($config['cds'], 60); - if (!($connect instanceof \Database\Mysql\PDO)) { - throw new Exception("Get database link wait timeout."); - } - } - $this->total += 1; - return new \Database\Mysql\PDO($config); - }; - } - - /** * @param string $name * @param \Database\Mysql\PDO $PDO $PDO @@ -185,16 +166,6 @@ class Connection extends Component } - /** - * @param $coroutineName - * @return bool - */ - private function hasClient($coroutineName): bool - { - return Context::exists($coroutineName); - } - - /** * batch release * @throws Exception