"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/checker/checkercomponent.cpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

checkercomponent.cpp  (icinga2-2.11.5):checkercomponent.cpp  (icinga2-2.12.0)
skipping to change at line 76 skipping to change at line 76
} }
void CheckerComponent::Stop(bool runtimeRemoved) void CheckerComponent::Stop(bool runtimeRemoved)
{ {
{ {
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();
} }
double wait = 0.0;
while (Checkable::GetPendingChecks() > 0) {
Log(LogDebug, "CheckerComponent")
<< "Waiting for running checks (" << Checkable::GetPendin
gChecks()
<< ") to finish. Waited for " << wait << " seconds now.";
Utility::Sleep(0.1);
wait += 0.1;
/* Pick a timeout slightly shorther than the process reload timeo
ut. */
double reloadTimeout = Application::GetReloadTimeout();
double waitMax = reloadTimeout - 30;
if (waitMax <= 0)
waitMax = 1;
if (wait > waitMax) {
Log(LogWarning, "CheckerComponent")
<< "Checks running too long for " << wait
<< " seconds, hard shutdown before reload timeout
: " << reloadTimeout << ".";
break;
}
}
m_ResultTimer->Stop(); m_ResultTimer->Stop();
m_Thread.join(); m_Thread.join();
Log(LogInformation, "CheckerComponent") Log(LogInformation, "CheckerComponent")
<< "'" << GetName() << "' stopped."; << "'" << GetName() << "' stopped.";
ObjectImpl<CheckerComponent>::Stop(runtimeRemoved); ObjectImpl<CheckerComponent>::Stop(runtimeRemoved);
} }
void CheckerComponent::CheckThreadProc() void CheckerComponent::CheckThreadProc()
 End of changes. 1 change blocks. 
27 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)