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