111
This commit is contained in:
+4
-2
@@ -48,12 +48,14 @@ class Pool extends Component
|
|||||||
protected function pop(Channel $channel, $retain_number): void
|
protected function pop(Channel $channel, $retain_number): void
|
||||||
{
|
{
|
||||||
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -217,8 +219,8 @@ class Pool extends Component
|
|||||||
if (!isset(static::$_connections[$name])) {
|
if (!isset(static::$_connections[$name])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$channel = static::$_connections[$name];
|
static::$_connections[$name] = null;
|
||||||
$this->pop($channel, 0);
|
unset(static::$_connections[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user