mirror of https://github.com/Icinga/icinga2.git
Fix another RedisWriter crash
Same as the other fix, this makes us lose events
This commit is contained in:
parent
eec1928a0b
commit
a056e14834
|
@ -703,13 +703,15 @@ void RedisWriter::VersionChangedHandler(const ConfigObject::Ptr& object)
|
|||
if (object->IsActive()) {
|
||||
// Create or update the object config
|
||||
for (const RedisWriter::Ptr& rw : ConfigType::GetObjectsByType<RedisWriter>()) {
|
||||
rw->m_WorkQueue.Enqueue(std::bind(&RedisWriter::SendConfigUpdate, rw, object, true));
|
||||
if (rw)
|
||||
rw->m_WorkQueue.Enqueue(std::bind(&RedisWriter::SendConfigUpdate, rw, object, true));
|
||||
}
|
||||
} else if (!object->IsActive() &&
|
||||
object->GetExtension("ConfigObjectDeleted")) { // same as in apilistener-configsync.cpp
|
||||
// Delete object config
|
||||
for (const RedisWriter::Ptr& rw : ConfigType::GetObjectsByType<RedisWriter>()) {
|
||||
rw->m_WorkQueue.Enqueue(std::bind(&RedisWriter::SendConfigDelete, rw, object));
|
||||
if (rw)
|
||||
rw->m_WorkQueue.Enqueue(std::bind(&RedisWriter::SendConfigDelete, rw, object));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue