This commit is contained in:
2021-10-20 14:42:20 +08:00
parent 2d968c3623
commit b4d0c95a80
3 changed files with 7 additions and 61 deletions
+7
View File
@@ -218,6 +218,13 @@ class Pool extends Component
if (!isset(static::$_connections[$name])) {
return;
}
/** @var Channel|SplQueue $connection */
foreach (static::$_connections[$name] as $connection) {
$client = $connection->pop();
if ($client instanceof StopHeartbeatCheck) {
$client->stopHeartbeatCheck();
}
}
static::$_connections[$name] = null;
unset(static::$_connections[$name]);
}