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) void CheckerComponent::Stop(void)
{ {
Log(LogInformation, "checker", "Checker stopped.");
{ {
boost::mutex::scoped_lock lock(m_Mutex); boost::mutex::scoped_lock lock(m_Mutex);
m_Stopped = true; m_Stopped = true;
m_CV.notify_all(); m_CV.notify_all();
} }
m_ResultTimer->Stop();
m_Thread.join(); m_Thread.join();
} }

View File

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

View File

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