111
This commit is contained in:
+5
-7
@@ -47,14 +47,12 @@ class Pool extends Component
|
|||||||
*/
|
*/
|
||||||
protected function pop(Channel $channel, $retain_number): void
|
protected function pop(Channel $channel, $retain_number): void
|
||||||
{
|
{
|
||||||
if (!Context::inCoroutine()) {
|
|
||||||
$channel->close();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
while ($channel->length() > $retain_number) {
|
while ($channel->length() > $retain_number) {
|
||||||
$connection = $channel->pop();
|
if (Context::inCoroutine()) {
|
||||||
if ($connection instanceof StopHeartbeatCheck) {
|
$connection = $channel->pop();
|
||||||
$connection->stopHeartbeatCheck();
|
if ($connection instanceof StopHeartbeatCheck) {
|
||||||
|
$connection->stopHeartbeatCheck();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user