From 7e409968beb8fd577884769b3dceb441875b2f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 11 Jul 2022 18:33:25 +0800 Subject: [PATCH] modify plugin name --- kiri-engine/Pool/Pool.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kiri-engine/Pool/Pool.php b/kiri-engine/Pool/Pool.php index e47a093e..a1376d1b 100644 --- a/kiri-engine/Pool/Pool.php +++ b/kiri-engine/Pool/Pool.php @@ -58,11 +58,9 @@ class Pool extends Component protected function pop(PoolQueue $channel, $retain_number): void { while ($channel->length() > $retain_number) { - if (Context::inCoroutine()) { - $connection = $channel->pop(); - if ($connection instanceof StopHeartbeatCheck) { - $connection->stopHeartbeatCheck(); - } + $connection = $channel->pop(0.001); + if ($connection instanceof StopHeartbeatCheck) { + $connection->stopHeartbeatCheck(); } } }