This commit is contained in:
2021-07-05 16:15:45 +08:00
parent 0ba9fc0ce7
commit cf8b25d7db
3 changed files with 3 additions and 4 deletions
-1
View File
@@ -95,7 +95,6 @@ class ClientsPool extends Component
if (str_starts_with('Mysql', $key)) { if (str_starts_with('Mysql', $key)) {
$this->debug('Worker #' . env('worker') . ' use client -> ' . $key . ':' . $total); $this->debug('Worker #' . env('worker') . ' use client -> ' . $key . ':' . $total);
} }
$total += $channel->length(); $total += $channel->length();
} }
if ($total < 1) { if ($total < 1) {
+2 -2
View File
@@ -202,9 +202,9 @@ class Connection extends Component
* batch release * batch release
* @throws Exception * @throws Exception
*/ */
public function connection_clear() public function connection_clear($name, $isMaster)
{ {
$this->getPool()->flush(0); $this->getPool()->clean($this->getPool()->name($name, $isMaster));
} }
+1 -1
View File
@@ -108,8 +108,8 @@ class Redis extends Component
if (Context::hasContext($coroutineName)) { if (Context::hasContext($coroutineName)) {
$this->getPool()->decrement($coroutineName); $this->getPool()->decrement($coroutineName);
} }
$this->getPool()->clean($coroutineName);
Context::remove($coroutineName); Context::remove($coroutineName);
$this->getPool()->flush(0);
} }