feat: Connect to daemon IPC on start request
This commit is contained in:
@ -175,8 +175,6 @@ CoreProcess::CoreProcess(const IAppConfig &appConfig, const IServerConfig &serve
|
||||
qDebug("retry cancelled, process state is not retry pending");
|
||||
}
|
||||
});
|
||||
|
||||
m_daemonIpcClient->connectToServer();
|
||||
}
|
||||
|
||||
void CoreProcess::onIpcClientServiceReady()
|
||||
@ -276,8 +274,7 @@ void CoreProcess::startProcessFromDaemon(const QString &app, const QStringList &
|
||||
}
|
||||
|
||||
if (!m_daemonIpcClient->isConnected()) {
|
||||
qFatal("cannot start process, daemon ipc not connected");
|
||||
return;
|
||||
m_daemonIpcClient->connectToServer();
|
||||
}
|
||||
|
||||
QString commandQuoted = makeQuotedArgs(app, args);
|
||||
|
||||
@ -26,6 +26,8 @@ DaemonIpcClient::~DaemonIpcClient()
|
||||
|
||||
void DaemonIpcClient::connectToServer()
|
||||
{
|
||||
qInfo("connecting to daemon ipc");
|
||||
|
||||
m_socket->connectToServer(kDaemonIpcName);
|
||||
if (!m_socket->waitForConnected(kTimeout)) {
|
||||
qCritical() << "ipc client failed to connect to server:" << kDaemonIpcName;
|
||||
|
||||
Reference in New Issue
Block a user