Fix timeout

This commit is contained in:
Jean Flach 2018-11-29 15:46:29 +01:00 committed by Michael Friedrich
parent 6ce4612cd7
commit d104eb4ac1

View File

@ -687,7 +687,9 @@ Dictionary::Ptr RedisWriter::SerializeState(const Checkable::Ptr& checkable)
attrs->Set("in_downtime", checkable->IsInDowntime());
if (checkable->GetCheckTimeout())
if (checkable->GetCheckTimeout().IsEmpty())
attrs->Set("check_timeout",checkable->GetCheckCommand()->GetTimeout());
else
attrs->Set("check_timeout", checkable->GetCheckTimeout());
attrs->Set("last_update", Utility::GetTime());