diff --git a/kiri-engine/Pool/Pool.php b/kiri-engine/Pool/Pool.php index 206f14d7..1efb94af 100644 --- a/kiri-engine/Pool/Pool.php +++ b/kiri-engine/Pool/Pool.php @@ -220,6 +220,10 @@ class Pool extends Component return; } while (static::$_connections[$name]->length() > 0) { + if (!Context::inCoroutine() && static::$_connections[$name] instanceof Channel) + { + break; + } $client = static::$_connections[$name]->pop(); if ($client instanceof StopHeartbeatCheck) { $client->stopHeartbeatCheck();