Stop checks during shutdown.

Fixes #5784
This commit is contained in:
Gunnar Beutner 2014-03-17 09:04:19 +01:00
parent ecce27f9da
commit 4d6088bee1
3 changed files with 5 additions and 2 deletions

View File

@ -84,12 +84,15 @@ void CheckerComponent::Start(void)
void CheckerComponent::Stop(void)
{
Log(LogInformation, "checker", "Checker stopped.");
{
boost::mutex::scoped_lock lock(m_Mutex);
m_Stopped = true;
m_CV.notify_all();
}
m_ResultTimer->Stop();
m_Thread.join();
}

View File

@ -87,7 +87,7 @@ stop() {
printf '.'
sleep 1
sleep 3
done
fi

View File

@ -174,10 +174,10 @@ void Application::RunEventLoop(void) const
Utility::Sleep(0.5);
Log(LogInformation, "base", "Shutting down Icinga...");
DynamicObject::StopObjects();
Application::GetInstance()->OnShutdown();
#ifdef _DEBUG
DynamicObject::StopObjects();
GetTP().Stop();
m_ShuttingDown = false;