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