diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index d280dea30..91b3c7375 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -802,6 +802,9 @@ void IcingaDB::InsertObjectDependencies(const ConfigObject::Ptr& object, const S void IcingaDB::UpdateState(const Checkable::Ptr& checkable) { + if (!m_Rcon || !m_Rcon->IsConnected()) + return; + Dictionary::Ptr stateAttrs = SerializeState(checkable); m_Rcon->FireAndForgetQuery({"HSET", m_PrefixStateObject + GetLowerCaseTypeNameDB(checkable), GetObjectIdentifier(checkable), JsonEncode(stateAttrs)}, Prio::State);