From: Michael Friedrich Date: Thu, 18 Jul 2013 16:28:23 +0000 (+0200) Subject: fix object lock X-Git-Tag: v0.0.3~817 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15f88c95826938e5877dc8e3aeff2a71b034ac3e;p=icinga2 fix object lock --- diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp index 8677c8209..ef9f2882e 100644 --- a/lib/icinga/service-check.cpp +++ b/lib/icinga/service-check.cpp @@ -470,9 +470,6 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr) bool reachable = IsReachable(); - if (!reachable) - SetLastStateUnreachable(Utility::GetTime()); - Host::Ptr host = GetHost(); bool host_reachable = true; @@ -525,6 +522,9 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr) SetLastStateUnknown(Utility::GetTime()); } + if (!reachable) + SetLastStateUnreachable(Utility::GetTime()); + SetCurrentCheckAttempt(attempt); int state = cr->Get("state");