File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -333,14 +333,21 @@ Checkable::ProcessingResult Checkable::ProcessCheckResult(const CheckResult::Ptr
333
333
334
334
cr->SetVarsAfter (vars_after);
335
335
336
- bool problem_change = false ;
337
336
if (service) {
338
337
SetLastCheckResult (cr);
339
338
} else {
340
339
bool wasProblem = GetProblem ();
340
+
341
341
SetLastCheckResult (cr);
342
- problem_change = GetProblem () != wasProblem;
342
+
343
+ if (GetProblem () != wasProblem) {
344
+ auto services = host->GetServices ();
345
+ for (auto & service : services) {
346
+ Service::OnHostProblemChanged (service, cr, origin);
347
+ }
348
+ }
343
349
}
350
+
344
351
bool was_flapping = IsFlapping ();
345
352
346
353
UpdateFlappingStatus (cr->GetState ());
@@ -490,13 +497,7 @@ Checkable::ProcessingResult Checkable::ProcessCheckResult(const CheckResult::Ptr
490
497
if ((stateChange || hardChange) && !children.empty () && (affectsPreviousStateChildren || AffectsChildren ()))
491
498
OnReachabilityChanged (this , cr, children, origin);
492
499
493
- olock->Unlock ();
494
- if (!service && problem_change) {
495
- auto services = host->GetServices ();
496
- for (auto & service : services) {
497
- Service::OnHostProblemChanged (service, cr, origin);
498
- }
499
- }
500
+ olock.Unlock ();
500
501
501
502
if (recovery) {
502
503
for (auto & child : children) {
You can’t perform that action at this time.
0 commit comments