111
This commit is contained in:
@@ -48,14 +48,12 @@ 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ class OnServerWorker extends \Server\Abstracts\Server
|
|||||||
*/
|
*/
|
||||||
public function onWorkerExit(Server $server, int $workerId)
|
public function onWorkerExit(Server $server, int $workerId)
|
||||||
{
|
{
|
||||||
$this->eventDispatch->dispatch(new OnWorkerExit($server, $workerId));
|
|
||||||
|
|
||||||
ServerManager::setEnv('state', 'exit');
|
ServerManager::setEnv('state', 'exit');
|
||||||
|
|
||||||
|
$this->eventDispatch->dispatch(new OnWorkerExit($server, $workerId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user