This commit is contained in:
2021-01-05 16:32:48 +08:00
parent 738eed2a7c
commit 7a570c1376
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -166,6 +166,7 @@ abstract class Pool extends Component
/** /**
* @param string $name * @param string $name
* @throws Exception
*/ */
public function clean(string $name) public function clean(string $name)
{ {
@@ -175,6 +176,8 @@ abstract class Pool extends Component
$channel = $this->_items[$name]; $channel = $this->_items[$name];
while ([$time, $client] = $channel->pop(0.001)) { while ([$time, $client] = $channel->pop(0.001)) {
unset($client); unset($client);
$this->desc($name);
} }
} }
+1 -1
View File
@@ -137,7 +137,7 @@ class Redis extends Pool
return; return;
} }
$this->_create -= 1; $this->desc($coroutineName);
$this->remove($coroutineName); $this->remove($coroutineName);
$this->clean($coroutineName); $this->clean($coroutineName);