mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-06 20:07:09 +08:00
fixed: ipc client connected event was being wiped out
daemon now communicates graceful shutdown message through new ipc system.
This commit is contained in:
@@ -221,6 +221,8 @@ CDaemonApp::mainLoop(bool logToFile)
|
||||
eventQueue.removeHandler(
|
||||
CIpcServer::getClientConnectedEvent(), m_ipcServer);
|
||||
|
||||
CLOG->remove(m_ipcLogOutputter);
|
||||
delete m_ipcLogOutputter;
|
||||
delete m_ipcServer;
|
||||
|
||||
DAEMON_RUNNING(false);
|
||||
@@ -278,8 +280,6 @@ void
|
||||
CDaemonApp::handleIpcMessage(const CEvent& e, void*)
|
||||
{
|
||||
CIpcMessage& m = *static_cast<CIpcMessage*>(e.getData());
|
||||
LOG((CLOG_DEBUG "ipc message, type=%d", m.m_type));
|
||||
|
||||
switch (m.m_type) {
|
||||
case kIpcCommand: {
|
||||
CString& command = *static_cast<CString*>(m.m_data);
|
||||
@@ -300,9 +300,5 @@ CDaemonApp::handleIpcMessage(const CEvent& e, void*)
|
||||
m_relauncher->command(command);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG((CLOG_ERR "ipc message not supported, type=%d", m.m_type));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user