GODT-2038: interrupt gRPC initialisation of bridge process terminates.

This commit is contained in:
Xavier Michelon
2022-11-07 14:34:13 +01:00
committed by Romain LE JEUNE
parent a949a113cf
commit f5148074fd
6 changed files with 64 additions and 30 deletions

View File

@ -288,7 +288,7 @@ int main(int argc, char *argv[])
}
log.info(QString("Retrieving gRPC service configuration from '%1'").arg(QDir::toNativeSeparators(grpcServerConfigPath())));
app().backend().init(GRPCClient::waitAndRetrieveServiceConfig(attach ? 0 : grpcServiceConfigWaitDelayMs));
app().backend().init(GRPCClient::waitAndRetrieveServiceConfig(attach ? 0 : grpcServiceConfigWaitDelayMs, app().bridgeMonitor()));
if (!attach)
GRPCClient::removeServiceConfigFile();
@ -312,7 +312,7 @@ int main(int argc, char *argv[])
if (bridgeMonitor)
{
const ProcessMonitor::MonitorStatus& status = bridgeMonitor->getStatus();
if (!status.running && !attach)
if (status.ended && !attach)
{
// ProcessMonitor already stopped meaning we are attached to an orphan Bridge.
// Restart the full process to be sure there is no more bridge orphans