Check consumer exists before sending a message

This commit is contained in:
Jon Beniston 2021-01-08 13:43:08 +00:00
parent aafa88ab37
commit 4a3072343d
1 changed files with 2 additions and 1 deletions

View File

@ -121,7 +121,8 @@ public:
QList<Consumer*>& consumers = cIt.value();
for (int i = 0; i < consumers.size(); i++) {
sendMessageToConsumer(m_elements->operator[](producerKey)[i], producerKey, consumers[i]);
if (existsConsumer(consumers[i]))
sendMessageToConsumer(m_elements->operator[](producerKey)[i], producerKey, consumers[i]);
}
}
}