protected function bootstrapFailed(Connection $conn)
{
$port = $this->getPort($conn);
$this->slaves[$port]['bootstrapFailed']++;
if ($this->isDebug()) {
$this->output->writeln('');
if (!$this->emergencyMode) {
$this->emergencyMode = true;
$this->output->writeln(sprintf('<error>Application bootstrap failed. We are entering emergency mode now. All offline. ' . 'Waiting for file changes ...</error>'));
} else {
$this->output->writeln(sprintf('<error>Application bootstrap failed. We are still in emergency mode. All offline. ' . 'Waiting for file changes ...</error>'));
}
foreach ($this->slaves as &$slave) {
$slave['keepClosed'] = true;
if (!empty($slave['connection'])) {
$slave['connection']->close();
}
}
} else {
$this->output->writeln(sprintf('<error>Application bootstrap failed. Restart worker ...</error>'));
}
}