fixed: ipc client connected event was being wiped out

daemon now communicates graceful shutdown message through new ipc system.
This commit is contained in:
Nick Bolton
2012-07-05 19:10:04 +00:00
parent 3d6551f708
commit ddb2d7feeb
10 changed files with 44 additions and 38 deletions

View File

@@ -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;
}
}