111
This commit is contained in:
+2
-4
@@ -47,17 +47,15 @@ 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) {
|
||||||
|
if (Context::inCoroutine()) {
|
||||||
$connection = $channel->pop();
|
$connection = $channel->pop();
|
||||||
if ($connection instanceof StopHeartbeatCheck) {
|
if ($connection instanceof StopHeartbeatCheck) {
|
||||||
$connection->stopHeartbeatCheck();
|
$connection->stopHeartbeatCheck();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user