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 @@ -344,14 +344,21 @@ Checkable::ProcessingResult Checkable::ProcessCheckResult(const CheckResult::Ptr
344
344
345
345
cr->SetVarsAfter (vars_after);
346
346
347
- bool problem_change = false ;
348
347
if (service) {
349
348
SetLastCheckResult (cr);
350
349
} else {
351
350
bool wasProblem = GetProblem ();
351
+
352
352
SetLastCheckResult (cr);
353
- problem_change = GetProblem () != wasProblem;
353
+
354
+ if (GetProblem () != wasProblem) {
355
+ auto services = host->GetServices ();
356
+ for (auto & service : services) {
357
+ Service::OnHostProblemChanged (service, cr, origin);
358
+ }
359
+ }
354
360
}
361
+
355
362
bool was_flapping = IsFlapping ();
356
363
357
364
UpdateFlappingStatus (cr->GetState ());
@@ -501,13 +508,7 @@ Checkable::ProcessingResult Checkable::ProcessCheckResult(const CheckResult::Ptr
501
508
if ((stateChange || hardChange) && !children.empty () && (affectsPreviousStateChildren || AffectsChildren ()))
502
509
OnReachabilityChanged (this , cr, children, origin);
503
510
504
- olock->Unlock ();
505
- if (!service && problem_change) {
506
- auto services = host->GetServices ();
507
- for (auto & service : services) {
508
- Service::OnHostProblemChanged (service, cr, origin);
509
- }
510
- }
511
+ olock.Unlock ();
511
512
512
513
if (recovery) {
513
514
for (auto & child : children) {
You can’t perform that action at this time.
0 commit comments