From 60e71aad385cd83eaa3c233013322e80f8f082d3 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Fri, 29 Aug 2025 10:07:47 -0400 Subject: [PATCH] fix: missing IPC messages fixes #8905 --- src/lib/deskflow/ClientApp.cpp | 4 ++-- src/lib/deskflow/ServerApp.cpp | 2 +- src/lib/gui/core/CoreProcess.cpp | 9 ++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/lib/deskflow/ClientApp.cpp b/src/lib/deskflow/ClientApp.cpp index e0a2199fd..4110886c5 100644 --- a/src/lib/deskflow/ClientApp.cpp +++ b/src/lib/deskflow/ClientApp.cpp @@ -232,7 +232,7 @@ void ClientApp::scheduleClientRestart(double retryTime) void ClientApp::handleClientConnected() const { - LOG_NOTE("connected to server"); + LOG_IPC("connected to server"); } void ClientApp::handleClientFailed(const Event &e) @@ -267,7 +267,7 @@ void ClientApp::handleClientRefused(const Event &e) void ClientApp::handleClientDisconnected() { - LOG_NOTE("disconnected from server"); + LOG_IPC("disconnected from server"); if (!args().m_restartable) { getEvents()->addEvent(Event(EventTypes::Quit)); } else if (!m_suspended) { diff --git a/src/lib/deskflow/ServerApp.cpp b/src/lib/deskflow/ServerApp.cpp index ecdf74e81..192d8ba90 100644 --- a/src/lib/deskflow/ServerApp.cpp +++ b/src/lib/deskflow/ServerApp.cpp @@ -440,7 +440,7 @@ bool ServerApp::startServer() listener->setServer(m_server); m_server->setListener(listener); m_listener = listener; - LOG_NOTE("started server, waiting for clients"); + LOG_IPC("started server, waiting for clients"); m_serverState = Started; return true; } catch (SocketAddressInUseException &e) { diff --git a/src/lib/gui/core/CoreProcess.cpp b/src/lib/gui/core/CoreProcess.cpp index 8256165ee..6fce959e9 100644 --- a/src/lib/gui/core/CoreProcess.cpp +++ b/src/lib/gui/core/CoreProcess.cpp @@ -6,6 +6,7 @@ #include "CoreProcess.h" +#include "base/Log.h" #include "common/ExitCodes.h" #include "common/Settings.h" #include "gui/ipc/DaemonIpcClient.h" @@ -203,16 +204,14 @@ void CoreProcess::onProcessFinished(int exitCode, QProcess::ExitStatus) m_retryTimer.stop(); } - if (exitCode == s_exitSuccess) { - qDebug("desktop process exited normally"); - } else if (exitCode != s_exitDuplicate) { - qWarning("desktop process exited with error code: %d", exitCode); - } else { + if (exitCode == s_exitDuplicate) { setProcessState(ProcessState::Stopped); qWarning("desktop process is already running"); return; } + LOG_IPC("desktop process exited with code: %d", exitCode); + if (const auto wasStarted = m_processState == ProcessState::Started; wasStarted) { qDebug("desktop process was running, retrying in %d ms", kRetryDelay); setProcessState(ProcessState::RetryPending);