diff --git a/System/Pool/ClientsPool.php b/System/Pool/ClientsPool.php index 10be814f..c787a244 100644 --- a/System/Pool/ClientsPool.php +++ b/System/Pool/ClientsPool.php @@ -95,7 +95,6 @@ class ClientsPool extends Component if (str_starts_with('Mysql', $key)) { $this->debug('Worker #' . env('worker') . ' use client -> ' . $key . ':' . $total); } - $total += $channel->length(); } if ($total < 1) { diff --git a/System/Pool/Connection.php b/System/Pool/Connection.php index 4d809c87..37f3102f 100644 --- a/System/Pool/Connection.php +++ b/System/Pool/Connection.php @@ -202,9 +202,9 @@ class Connection extends Component * batch release * @throws Exception */ - public function connection_clear() + public function connection_clear($name, $isMaster) { - $this->getPool()->flush(0); + $this->getPool()->clean($this->getPool()->name($name, $isMaster)); } diff --git a/System/Pool/Redis.php b/System/Pool/Redis.php index 354935db..29bfd365 100644 --- a/System/Pool/Redis.php +++ b/System/Pool/Redis.php @@ -108,8 +108,8 @@ class Redis extends Component if (Context::hasContext($coroutineName)) { $this->getPool()->decrement($coroutineName); } + $this->getPool()->clean($coroutineName); Context::remove($coroutineName); - $this->getPool()->flush(0); }