This commit is contained in:
as2252258@163.com
2021-09-06 01:36:03 +08:00
parent 0116fb2e51
commit 896f4e08f6
+4
View File
@@ -46,6 +46,10 @@ class Pool extends Component
*/
protected function pop(Channel $channel, $retain_number): void
{
if ($channel instanceof Channel && Coroutine::getCid() === -1) {
unset($channel);
return;
}
while ($channel->length() > $retain_number) {
$connection = $channel->pop();
if ($connection instanceof StopHeartbeatCheck) {