mirror of https://github.com/Icinga/icinga2.git
cluster: Avoid unnecessary SetForceNextCheck messages.
This commit is contained in:
parent
a8972e78f8
commit
45219433bb
|
@ -103,9 +103,10 @@ void CheckerComponent::CheckThreadProc(void)
|
||||||
|
|
||||||
m_IdleServices.erase(service);
|
m_IdleServices.erase(service);
|
||||||
|
|
||||||
|
bool forced = service->GetForceNextCheck();
|
||||||
bool check = true;
|
bool check = true;
|
||||||
|
|
||||||
if (!service->GetForceNextCheck()) {
|
if (!forced) {
|
||||||
if (!service->GetEnableActiveChecks()) {
|
if (!service->GetEnableActiveChecks()) {
|
||||||
Log(LogDebug, "checker", "Skipping check for service '" + service->GetName() + "': active checks are disabled");
|
Log(LogDebug, "checker", "Skipping check for service '" + service->GetName() + "': active checks are disabled");
|
||||||
check = false;
|
check = false;
|
||||||
|
@ -136,7 +137,7 @@ void CheckerComponent::CheckThreadProc(void)
|
||||||
|
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
||||||
{
|
if (forced) {
|
||||||
ObjectLock olock(service);
|
ObjectLock olock(service);
|
||||||
service->SetForceNextCheck(false);
|
service->SetForceNextCheck(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue