This commit is contained in:
as2252258@163.com
2021-09-06 01:57:01 +08:00
parent 05adb043f2
commit 5bd3d98250
+2 -4
View File
@@ -47,17 +47,15 @@ class Pool extends Component
*/
protected function pop(Channel $channel, $retain_number): void
{
if (!Context::inCoroutine()) {
$channel->close();
return;
}
while ($channel->length() > $retain_number) {
if (Context::inCoroutine()) {
$connection = $channel->pop();
if ($connection instanceof StopHeartbeatCheck) {
$connection->stopHeartbeatCheck();
}
}
}
}
/**