fixed lousy ipc client/server cleanup and shutdown doubled timeout.
This commit is contained in:
parent
db3ea4ab9c
commit
738c321bae
|
@ -46,7 +46,6 @@ CIpcClient::init()
|
||||||
|
|
||||||
CIpcClient::~CIpcClient()
|
CIpcClient::~CIpcClient()
|
||||||
{
|
{
|
||||||
disconnect();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -184,6 +184,7 @@ CIpcClientProxy::disconnect()
|
||||||
{
|
{
|
||||||
LOG((CLOG_DEBUG "ipc client proxy disconnect"));
|
LOG((CLOG_DEBUG "ipc client proxy disconnect"));
|
||||||
m_disconnecting = true;
|
m_disconnecting = true;
|
||||||
|
m_stream.close();
|
||||||
EVENTQUEUE->addEvent(CEvent(getDisconnectedEvent(), this));
|
EVENTQUEUE->addEvent(CEvent(getDisconnectedEvent(), this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,6 @@ CIpcServerProxy::~CIpcServerProxy()
|
||||||
{
|
{
|
||||||
EVENTQUEUE->removeHandler(m_stream.getInputReadyEvent(),
|
EVENTQUEUE->removeHandler(m_stream.getInputReadyEvent(),
|
||||||
m_stream.getEventTarget());
|
m_stream.getEventTarget());
|
||||||
|
|
||||||
m_stream.close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -276,7 +276,7 @@ CMSWindowsRelauncher::mainLoop(void*)
|
||||||
|
|
||||||
if (launched) {
|
if (launched) {
|
||||||
LOG((CLOG_DEBUG "closing existing process to make way for new one"));
|
LOG((CLOG_DEBUG "closing existing process to make way for new one"));
|
||||||
shutdownProcess(pi.hProcess, pi.dwProcessId, 10);
|
shutdownProcess(pi.hProcess, pi.dwProcessId, 20);
|
||||||
launched = false;
|
launched = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ CMSWindowsRelauncher::mainLoop(void*)
|
||||||
|
|
||||||
if (launched) {
|
if (launched) {
|
||||||
LOG((CLOG_DEBUG "terminated running process on exit"));
|
LOG((CLOG_DEBUG "terminated running process on exit"));
|
||||||
shutdownProcess(pi.hProcess, pi.dwProcessId, 10);
|
shutdownProcess(pi.hProcess, pi.dwProcessId, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG((CLOG_DEBUG "relauncher main thread finished"));
|
LOG((CLOG_DEBUG "relauncher main thread finished"));
|
||||||
|
@ -506,7 +506,7 @@ CMSWindowsRelauncher::shutdownExistingProcesses()
|
||||||
_stricmp(entry.szExeFile, "synergys.exe") == 0) {
|
_stricmp(entry.szExeFile, "synergys.exe") == 0) {
|
||||||
|
|
||||||
HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, entry.th32ProcessID);
|
HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, entry.th32ProcessID);
|
||||||
shutdownProcess(handle, entry.th32ProcessID, 1);
|
shutdownProcess(handle, entry.th32ProcessID, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue