diff --git a/src/lib/ipc/IpcLogOutputter.cpp b/src/lib/ipc/IpcLogOutputter.cpp index 9999c412..d102b747 100644 --- a/src/lib/ipc/IpcLogOutputter.cpp +++ b/src/lib/ipc/IpcLogOutputter.cpp @@ -67,6 +67,8 @@ IpcLogOutputter::~IpcLogOutputter() ARCH->closeMutex(m_bufferMutex); if (m_bufferThread != nullptr) { + m_bufferThread->cancel(); + m_bufferThread->wait(); delete m_bufferThread; } diff --git a/src/test/mock/ipc/MockIpcServer.h b/src/test/mock/ipc/MockIpcServer.h index 6500887b..448e8a82 100644 --- a/src/test/mock/ipc/MockIpcServer.h +++ b/src/test/mock/ipc/MockIpcServer.h @@ -34,6 +34,16 @@ public: MockIpcServer() : m_sendCond(ARCH->newCondVar()), m_sendMutex(ARCH->newMutex()) { } + + ~MockIpcServer() { + if (m_sendCond != NULL) { + ARCH->closeCondVar(m_sendCond); + } + + if (m_sendMutex != NULL) { + ARCH->closeMutex(m_sendMutex); + } + } MOCK_METHOD0(listen, void()); MOCK_METHOD2(send, void(const IpcMessage&, EIpcClientType));