Other: Bridge app will be asked to close even in 'attached' mode.

This commit is contained in:
Xavier Michelon
2022-08-23 13:01:53 +02:00
committed by Jakub
parent 796c617569
commit 4443e39785

View File

@ -204,11 +204,12 @@ void launchBridge(QStringList const &args)
//**************************************************************************************************************************************************** //****************************************************************************************************************************************************
void closeBridgeApp() void closeBridgeApp()
{ {
app().grpc().quit(); // this will cause the grpc service and the bridge app to close.
UPOverseer& overseer = app().bridgeOverseer(); UPOverseer& overseer = app().bridgeOverseer();
if (!overseer) // The app was run in 'attach' mode and attached to an existing instance of Bridge. No need to close. if (!overseer) // The app was run in 'attach' mode and attached to an existing instance of Bridge. We're not monitoring it.
return; return;
app().grpc().quit(); // this will cause the grpc service and the bridge app to close.
while (!overseer->isFinished()) while (!overseer->isFinished())
{ {
QThread::msleep(20); QThread::msleep(20);