fix object lock

This commit is contained in:
Michael Friedrich 2013-07-18 18:28:23 +02:00
parent 446d9ad7c6
commit 15f88c9582
1 changed files with 3 additions and 3 deletions

View File

@ -470,9 +470,6 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr)
bool reachable = IsReachable(); bool reachable = IsReachable();
if (!reachable)
SetLastStateUnreachable(Utility::GetTime());
Host::Ptr host = GetHost(); Host::Ptr host = GetHost();
bool host_reachable = true; bool host_reachable = true;
@ -525,6 +522,9 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr)
SetLastStateUnknown(Utility::GetTime()); SetLastStateUnknown(Utility::GetTime());
} }
if (!reachable)
SetLastStateUnreachable(Utility::GetTime());
SetCurrentCheckAttempt(attempt); SetCurrentCheckAttempt(attempt);
int state = cr->Get("state"); int state = cr->Get("state");