mirror of https://github.com/Icinga/icinga2.git
Update next check before processing any result triggering status updates.
Fixes #5733
This commit is contained in:
parent
aa2c45f83e
commit
4a077c9ceb
|
@ -40,6 +40,7 @@ DbObject::DbObject(const shared_ptr<DbType>& type, const String& name1, const St
|
||||||
|
|
||||||
void DbObject::StaticInitialize(void)
|
void DbObject::StaticInitialize(void)
|
||||||
{
|
{
|
||||||
|
/* triggered in ProcessCheckResult(), requires UpdateNextCheck() to be called before */
|
||||||
DynamicObject::OnStateChanged.connect(boost::bind(&DbObject::StateChangedHandler, _1));
|
DynamicObject::OnStateChanged.connect(boost::bind(&DbObject::StateChangedHandler, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -405,6 +405,8 @@ void Service::ProcessCheckResult(const CheckResult::Ptr& cr, const String& autho
|
||||||
// "% current: " + Convert::ToString(GetFlappingCurrent()) + "%.");
|
// "% current: " + Convert::ToString(GetFlappingCurrent()) + "%.");
|
||||||
|
|
||||||
OnNewCheckResult(GetSelf(), cr, authority);
|
OnNewCheckResult(GetSelf(), cr, authority);
|
||||||
|
|
||||||
|
/* signal status updates to for example db_ido */
|
||||||
OnStateChanged(GetSelf());
|
OnStateChanged(GetSelf());
|
||||||
|
|
||||||
if (hardChange)
|
if (hardChange)
|
||||||
|
@ -536,11 +538,12 @@ void Service::ExecuteCheck(void)
|
||||||
result->SetExecutionEnd(after_check);
|
result->SetExecutionEnd(after_check);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* update next check before processing any result */
|
||||||
|
UpdateNextCheck();
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
ProcessCheckResult(result);
|
ProcessCheckResult(result);
|
||||||
|
|
||||||
UpdateNextCheck();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
ObjectLock olock(this);
|
ObjectLock olock(this);
|
||||||
m_CheckRunning = false;
|
m_CheckRunning = false;
|
||||||
|
|
Loading…
Reference in New Issue